Bug #3922 Updated: == bug
| From: | Bug Database | Date: | Sat, 20 May 2000 06:40:30 +0000 |
| Subject: | Bug #3922 Updated: == bug | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-18997@lists.php.net to get a copy of this message | ||
ID: 3922
Updated by: hholzgra
Reported By: fuf@fuf.sh.cvut.cz
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