Re: [PHP] is_null() and is_string() reversed when using in switch case statements... [SOLVED]

2011-07-15 Thread Jim Lucas
On 7/14/2011 7:44 PM, Daevid Vincent wrote: > Ah! Thanks Simon! That is exactly right. Doh! I should have thought of > that... *smacks head* > > Here is the fruit of my labor (and your fix)... > > /** > * Useful for debugging functions to see parameter names, etc. > * Based upon http://www.php.

RE: [PHP] is_null() and is_string() reversed when using in switch case statements... [SOLVED]

2011-07-14 Thread Daevid Vincent
> -Original Message- > From: Simon J Welsh [mailto:si...@welsh.co.nz] > Sent: Thursday, July 14, 2011 7:29 PM > To: Daevid Vincent > Cc: php-general@lists.php.net > Subject: Re: [PHP] is_null() and is_string() reversed when using in switch > case statements... >

Re: [PHP] is_null() and is_string() reversed when using in switch case statements...

2011-07-14 Thread Simon J Welsh
On 15/07/2011, at 1:58 PM, Daevid Vincent wrote: > function test($v) > { > var_dump($v); > > if (is_string($v)) echo "FOUND A STRING.\n"; > if (is_null($v)) echo "FOUND A NULL.\n"; > > switch ($v) > { > case is_string($v): > echo

[PHP] is_null() and is_string() reversed when using in switch case statements...

2011-07-14 Thread Daevid Vincent
Can someone double check me here, but I think I found a bug... int 1 1 => int 2 2 => int 3 3 => int 4 4 => int 5 I think v is an array [1,2,3,4,5] */ ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php