note 44907 rejected from functions.arguments by betz
| From: | betz@php.net | Date: | Thu, 19 Aug 2004 21:24:40 +0000 |
| Subject: | note 44907 rejected from functions.arguments by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-74955@lists.php.net to get a copy of this message | ||
Note Submitter: cerium at texas dot net
----
When using default parameter values, I found that the following does NOT work (at least in 4.3.3.):
myfunction($b=0){ //$b will ALWAYS be set to 0
echo $b;
}
myfunction(2);
results:
0
but this does:
myfunction($b="0"){ //$b will be whatever is passed
echo $b;
}
myfunction("2");
results:
2