Date: 05/20/00
- Next message: Zeev Suraski: "Re: [PHP-DEV] Bug #3922 Updated: == bug"
- Previous message: Bug Database: "[PHP-DEV] PHP 4.0 Bug #3251 Updated: 3rd arg to explode, (same 3rd arg that split() has)"
- Next in thread: Zeev Suraski: "Re: [PHP-DEV] Bug #3922 Updated: == bug"
- Reply: Zeev Suraski: "Re: [PHP-DEV] Bug #3922 Updated: == bug"
- Maybe reply: Bug Database: "[PHP-DEV] Bug #3922 Updated: == bug"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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>
- Next message: Zeev Suraski: "Re: [PHP-DEV] Bug #3922 Updated: == bug"
- Previous message: Bug Database: "[PHP-DEV] PHP 4.0 Bug #3251 Updated: 3rd arg to explode, (same 3rd arg that split() has)"
- Next in thread: Zeev Suraski: "Re: [PHP-DEV] Bug #3922 Updated: == bug"
- Reply: Zeev Suraski: "Re: [PHP-DEV] Bug #3922 Updated: == bug"
- Maybe reply: Bug Database: "[PHP-DEV] Bug #3922 Updated: == bug"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

