More specifically, an ampersand (&) prepended to an argument name means that the argument will be passed by reference (http://www.php.net/manual/en/language.references.pass.php).
![]() |
|
||||||||||
|
How to read a function definition (prototype)Each function in the manual is documented for quick reference. Knowing how to read and understand the text will make learning PHP much easier. Rather than relying on examples or cut/paste, you will want to know how to read function definitions (prototypes). Let's begin:
Function definitions tell us what type of value is returned. Let's use the definition for strlen() as our first example:
Таблица S-1. Explanation of a function definition
We could rewrite the above function definition in a generic way:
Many functions take on multiple parameters, such as in_array(). Its prototype is as follows:
What does this mean? in_array() returns a
boolean value, TRUE on
success (if the There are also functions with more complex PHP version information. Take html_entity_decode() as an example:
This means that this function was not available in PHP 3, and is only available in a released version since PHP 4.3.0. How to read a function definition (prototype)
php dot devel at homelinkcs dot com
12-Jul-2005 05:50
More specifically, an ampersand (&) prepended to an argument name means that the argument will be passed by reference (http://www.php.net/manual/en/language.references.pass.php).
ceo at l-i-e dot com
09-Mar-2005 03:16
Another thing to watch for is the & in the argument list. |