PHP 4.0 Bug #6076: NULL is isset in function arguments
| From: | php-bugs at bjoernsworld dot de | Date: | Thu, 10 Aug 2000 20:04:41 +0000 |
| Subject: | PHP 4.0 Bug #6076: NULL is isset in function arguments | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-28378@lists.php.net to get a copy of this message | ||
From: php-bugs@bjoernsworld.de
Operating system:
PHP version: 4.0.1pl2
PHP Bug Type: Misbehaving function
Bug description: NULL is isset in function arguments
<?php
function x($a = "foo")
{
print $a;
}
$val = NULL;
x($val);
?>
This should print out "foo" but it doesnt.
For my understanding this is an inconsequent behaivour. If i have
<?php
$a = NULL;
if (isset($a)) print "ok";
?>
"ok" won't be printed. So, if there is no value set, as isset says, there should not
be any value set when the value defaults to another value in the functions argument list.