Re: 'undef' as an argument value
| From: | Rodent of Unusual Size | Date: | Mon, 11 Mar 2002 21:24:45 +0000 |
| Subject: | Re: 'undef' as an argument value | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-88088@lists.php.net to get a copy of this message | ||
Rick Emery wrote:
>
> function foo($arg1_required, $arg2_optional="")
> if ($arg2_optional=="") {
> print "not passed";
> }
> else {
> print "explicit";
> }
> }
No, I said 'undef' because I mean 'undefined'. The argument
can have *any* value; I need to know when it has *none*. That
is, there is no magic cookie to which I can set the default that
might not be a valid call value.
--
#ken P-)}
Ken Coar, Sanagendamgagwedweinini http://Golux.Com/coar/
Author, developer, opinionist http://Apache-Server.Com/
"Millennium hand and shrimp!"