[PHP-DEV] Bug #3922 Updated: == bug From: Bug Database (php-dev <email protected>)
Date: 05/20/00

ID: 3922
Updated by: hholzgra
Reported By: fuf <email protected>
Status: Closed
Bug Type: Misbehaving function
Assigned To:
Comments:

it's not a bug, it's a feature :( (same in php4)

you compare an integer to a string,
the string is converted to an integer
and as 'N/A' does not contain any digits
its integer value is 0, so they are
equal
the other way round it wouldn't:

0 == 'N/A' -> true
'N/A' == 0 -> false

or in php4 you could use '===' instead of '=='

rather missleading, maybe string->integer
conversion should return something like
not-a-number instead of 0 in this case ?

Full Bug description available at: http://bugs.php.net/?id=3922

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>