PHP 4.0 Bug #3759: 'unset' function argument keyword doesn't work?
| From: | befletch at my dot yahoo dot com | Date: | Tue, 07 Mar 2000 21:13:00 +0000 |
| Subject: | PHP 4.0 Bug #3759: 'unset' function argument keyword doesn't work? | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-16514@lists.php.net to get a copy of this message | ||
From: befletch@my.yahoo.com
Operating system: OpenBSD 2.6
PHP version: 4.0 Beta 4 Patch Level 1
PHP Bug Type: Scripting Engine problem
Bug description: 'unset' function argument keyword doesn't work?
I can't get function arguments initalized to 'unset' to work anymore.
This example works fine:
function myfunc( $arg=1 )
{
echo $arg."<br>\n";
}
myfunc( );
myfunc( 'Hello, world.' );
Printing out '1' and 'Hello, world.' as expected. Modify it to:
function myfunc( $arg=unset )
{
echo $arg."<br>\n";
}
myfunc( );
myfunc( 'Hello, world.' );
This version gives me:
Parse error: parse error in /www/htdocs/test.html on line 7
where line 7 is the function myfunc() line.
This all worked fine with PHP4 betas 2 & 3.