Function username (): string, what does this mean?

Today, I took a look at a piece of code of the thinksns+ project. I don"t understand what string means after the method name. I haven"t seen it before. Can anyone explain it?

  protected function username(): string
        {
            return username(
                request()->input("login")
            );
        }
Php
Mar.10,2021

returns a string

New features of php7

clipboard.png


this is a new feature in php 7, specifying the function return value type

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3c546-41347.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3c546-41347.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?