PHP: return - Manual in Deutsh
PHP: return - Manual in French
PHP: return - Manual in Polish

You Are At PHP: return - Manual Area


recent searches:
include functions , variable functions , post functions...




If you are new to PHP or just need to refresh your skills, this is the place to start. This series of tutorials will give you the basic knowledge you will need to create a simple PHP website.

PHP is a reflective programming language originally designed for producing dynamic web pages.[1] PHP is used mainly in server-side scripting, but can be used from a command line interface or in standalone graphical applications. Textual User Interfaces can also be created using ncurses.

PHP Manual
PrevChapter 16. Control StructuresNext

return

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.

For more information, see Returning values.

Note: Note that since return() is a language construct and not a function, the parentheses surrounding its arguments are not required. It is common to leave them out, and you actually should do so as PHP has less work to do in this case.

Note: You should never use parentheses around your return variable when returning by reference, as this will not work. You can only return variables by reference, not the result of a statement. If you use return ($a); then you're not returning a variable, but the result of the expression ($a) (which is, of course, the value of $a).

szkolenia dla księgowych kursy księgowe księgowość
Solidnie i tanio przeprowadzki kraków transport mebli, profesjonalnie
kalkulator kredytu hipotecznego
Prawo jazdy Szczecin
Oryginalne perfumy w promocyjnych cenach

Another Useful functions:


zend.returning | zend-macro.return-zval | zend-macro.return-unicodel | zend-macro.return-unicode | zend-macro.return-u-stringl | zend-macro.return-u-string | zend-macro.return-textl | zend-macro.return-text | zend-macro.return-stringl | zend-macro.return-string | zend-macro.return-rt-stringl | zend-macro.return-rt-string | zend-macro.return-resource | zend-macro.return-null | zend-macro.return-long | zend-macro.return-empty-unicode | zend-macro.return-empty-string | zend-macro.return-empty-binary | zend-macro.return-double | zend-macro.return-bool | zend-macro.return-binaryl | zend-macro.return-binary | zend-macro.return-ascii-stringl | zend-macro.return-ascii-string | language.references.return | functions.returning-values | function.runkit-return-value-used | function.return | function.m-returnstatus | function.ccvs-return |


PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. If you are new to PHP and want to get some idea of how it works, try the introductory tutorial. After that, check out the online manual, and the example archive sites and some of the other resources available in the links section.