PHP 4 to PHP 5 change - allowing assignment to pass by reference function parameters.
| From: | Richard Quadling | Date: | Thu, 01 Jul 2010 10:21:39 +0000 |
| Subject: | PHP 4 to PHP 5 change - allowing assignment to pass by reference function parameters. | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-48990@lists.php.net to get a copy of this message | ||
Hi.
Is there any documentation regarding this change?
function ca_getUserDetails($pUserid, &$pResults=array()) {}
is fully allowable in PHP 5+, but not in PHP 4.
Depending upon version, the error is ...
Parse error: parse error, expecting ')'
or
Parse error: syntax error, unexpected '=', expecting ')'
I'm just looking for some notes to pass on.
Thank you.
Richard.
--
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling