I've written several functions with optional "string" parameters.
They work fine. But I've never written one that accepts an optional
"bool" parameter and I'm now confused.

I would like to have this:

function somefunction($text,$xxx="")
        $xxx parameter was passed as true or false
        $xxx parameter was not passed

Which is correct for the default initialization of $xxx:

How do I distinguish between false and "$xxx parameter not
passed"? Do I use isset()? Do I use ===?


John A. Grant  * I speak only for myself *  (remove 'z' to reply)
Radiation Geophysics, Geological Survey of Canada, Ottawa
If you followup, please do NOT e-mail me a copy: I will read it here

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to