note 110460 deleted from function.socket-recvfrom by googleguy
| From: | googleguy@php.net | Date: | Wed, 24 Oct 2012 13:38:07 +0000 |
| Subject: | note 110460 deleted from function.socket-recvfrom by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-191520@lists.php.net to get a copy of this message | ||
Note Submitter: uther pendragon
----
NOTE: in regards to passing the reference or "pointer" into the function, you should
*not* prefix the variable with the '&' symbol! The use of them in the function
prototype above is to illustrate that these variables will be referenced in the function. This is
done automatically by php, do *not* do this: func(&$a)!
see "Passing by Reference" in the php manual at: http://us1.php.net/manual/en/language.references.pass.php
"Note: There is no reference sign on a function call - only on function definitions. Function
definitions alone are enough to correctly pass the argument by reference. As of PHP 5.3.0, you will
get a warning saying that "call-time pass-by-reference" is deprecated when you use &
in foo(&$a);. And as of PHP 5.4.0, call-time pass-by-reference was removed, so using it will
raise a fatal error.")