Re: [PHP4BETA] returning a reference from a function ?

From: Date: Mon, 25 Oct 1999 13:45:58 +0000
Subject: Re: [PHP4BETA] returning a reference from a function ?
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-5688@lists.php.net to get a copy of this message
Samuel Liddicott wrote: > > Is there any legal way to return something from a function > > by _reference_ instead of _by copy_ ? > > > > "retrun &$var;" and "$var = &function();" cause syntax errors > > guessing here: > &$var=function(); > yet another syntax error > > > function byref(&$ref) { $ref = &$value; } > > does not behave as i would have expected in the first place > > ( see also http://bugs.php.net/bugs.php3?id=2589 ) > > In later versions default parameters must be constant anyway so this will > not be an issue. ????? this is not at all about default parameters

« previous php.version4 (#5688) next »