[PHP-DEV] Bug #786 Updated: Incorrect expression evaluation From: Bug Database (php-dev <email protected>)
Date: 09/25/98

ID: 786
Updated by: zeev
Reported By: torben <email protected>
Status: Closed
Bug Type: Performance problem
Assigned To:
Comments:

When one the arguments to a comparison operator is a number,
or a string that looks like a number, the comparison is
done numerically. In this case, 'r' is converted to a 0
(like any other non-numeric string), and thus the comparison
evaluates to TRUE.

If you know you want a string comparison, you should use
strcmp() instead.

Full Bug description available at: http://ca.php.net/bugs.php3?id=786

--
PHP Development Mailing List   http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe <email protected>
For help: php-dev-help <email protected>