Re: function args declared by-reference, with default value?

From: Date: Tue, 26 Nov 2002 07:10:21 +0000
Subject: Re: function args declared by-reference, with default value?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-126056@lists.php.net to get a copy of this message
Nick Eby wrote:
true or false: when declaring a function, a given argument can be declared to pass by reference, or can be declared to have a default value, but never both. i.e., you can only write one of: function foo(&$param) function foo($param = "bar") but never the equivalent of: function foo(&$param = "bar") is there a way to declare an argument with both pass-by-reference and default-value properties?
No, but this will be supported by Zend Engine 2, which will drive PHP 5 and higher. -- ------------------------------------------------------------------------- Derick Rethans http://derickrethans.nl/ PHP Magazine - PHP Magazine for Professionals http://php-mag.net/ -------------------------------------------------------------------------

« previous php.general (#126056) next »