If called from within a function, the return()
statement immediately ends execution of the current function, and
returns its argument as the value of the function
call. return() will also end the execution of
an eval() statement or script file.
If called from the global scope, then execution of the current
script file is ended. If the current script file was
include()ed or require()ed,
then control is passed back to the calling file. Furthermore, if
the current script file was include()ed, then
the value given to return() will be returned as
the value of the include() call. If
return() is called from within the main script
file, then script execution ends. If the current script file was
named by the auto_prepend_file or auto_append_file
configuration options in php.ini,
then that script file's execution is ended.
Note:
Note that since return() is a language
construct and not a function, the parentheses surrounding its
arguments are only required if the argument
contains an expression. It is common to leave them out while returning a variable.
Php return Function syntax tag
return php code on this is provided for your study purpose, it will guide you to know how create and design a website using php. use it to practice and train your self online
Php return syntax tutorial
php tutorial guide and code design are for easy learning and programming. The code practice section provided at the top is for practising of this syntax. Use the code section up to practice your php programming online. Learning php is very easy, all you need is to use the examples on this site and practice them to perfect your skills.