From:             [EMAIL PROTECTED]
Operating system: 
PHP version:      4.0.4pl1
PHP Bug Type:     *General Issues
Bug description:  distinction between false and "0" (string)


There is a subtle problem with functions returning 'false' as
an return status indication.

Take for example strstr(haystack, needle). 

The function returns 'false' to indicate that <needle> could not
be found in <haystack> or returns the substring of haystack
starting with <needle>

With certain strings the above assertion is not true with php:

$haystack='1230';

if (strstr($haystack,"0")==false)
        { echo ' oh no.. '; }




-- 
Edit Bug report at: http://bugs.php.net/?id=10678&edit=1



-- 
PHP Development 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