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

From: Date: Mon, 25 Oct 1999 13:36:19 +0000
Subject: RE: [PHP4BETA] returning a reference from a function ?
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-5687@lists.php.net to get a copy of this message
> -----Original Message----- > From: hholzgra@healey.highway.bertelsmann.de > [mailto:hholzgra@healey.highway.bertelsmann.de]On Behalf Of Hartmut > Holzgraefe > Sent: Monday, October 25, 1999 02:07 PM > To: php4-beta > Subject: [PHP4BETA] returning a reference from a function ? > > 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(); > 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. Sam

« previous php.version4 (#5687) next »