function args declared by-reference, with default value?
| From: | Nick Eby | Date: | Mon, 25 Nov 2002 22:40:59 +0000 |
| Subject: | function args declared by-reference, with default value? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-126010@lists.php.net to get a copy of this message | ||
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?