#10310 [Opn->Bgs]: feature request
| From: | sniper@php.net | Date: | Tue, 13 Apr 2004 20:17:47 +0000 |
| Subject: | #10310 [Opn->Bgs]: feature request | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-58077@lists.php.net to get a copy of this message | ||
ID: 10310
Updated by: sniper@php.net
Reported By: fabiankessler at usa dot net
-Status: Open
+Status: Bogus
Bug Type: Feature/Change Request
Operating System: all
PHP Version: 4.0.4
New Comment:
wont happen. (PHP != VB)
Previous Comments:
------------------------------------------------------------------------
[2001-04-12 15:29:21] fabiankessler at usa dot net
function foo($a, $b, $c='hello', $d='world') {
echo $c;
}
i'd like to use
foo('a', 'b', NULL, 'c');
or even better
foo('a', 'b', , 'c');
to have it echo 'hello', the default value.
i have to workaround using
function foo($a, $b, $c='hello', $d='world') {
if (is_null($c)) $c = 'hello';
echo $c;
}
is there a better way? i really miss this vb-feature.
greetings
fab
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=10310&edit=1