note 32131 added to functions.arguments
| From: | Carlos at rack1 dot php dot net | Date: | Sun, 18 May 2003 16:08:38 +0000 |
| Subject: | note 32131 added to functions.arguments | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-48525@lists.php.net to get a copy of this message | ||
It seems you cannot use 'optional' parameter whenever using referencts. Something close to
function( $a, $b="default")
{
...
}
with references could look:
function( &$a, &$b="default" )
{
...
}
I can understand such syntax &$b="default" may be disallowed, but I see no workaround.
This:
function( &$a, &$b=NULL )
does not work too. Any ideas how to have *optional* parameter passed by reference? PHP4.2.1 if
anyone cares.
--
Manual Page -- http://www.php.net/manual/en/functions.arguments.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+32131
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+32131&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+32131&report=yes