http://www.php.net/manual/en/function.func-num-args.php will return the
number of arguments passed to the function.

Kirk

> -----Original Message-----
> From: Rodent of Unusual Size [mailto:[EMAIL PROTECTED]]
> Sent: Monday, March 11, 2002 2:25 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] 'undef' as an argument value
> 
> 
> 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/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to