RE: [PHP] feature that should be there and isn't
| From: | Jason Murray | Date: | Wed, 31 Jan 2001 04:04:07 +0000 |
| Subject: | RE: [PHP] feature that should be there and isn't | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-37410@lists.php.net to get a copy of this message | ||
> BUT you can't do this:
>
> function foo($var=date("Y-m-d"))
> {
>
>
> }
But, you can do
function foo($var='defaultvaluethatwillneverhappen')
{
if ($var == 'defaultvaluethatwillneverhappen')
{ $var = date("Y-m-d"); }
}
> Why? This would be a kick ass little trick!
Mmmm, well ... *shrug* <handball.rasmus> :)
Jason