[Bug 928550] Re: PHP Comparison Issues ... 0 equates to 'D'
Steve Beattie
sbeattie at ubuntu.com
Wed Feb 8 00:03:09 UTC 2012
Thanks for taking the time to report this issue and help improve Ubuntu.
While from a programmer's perspective, it's unexpected behavior;
however, it is correct as documented at:
http://php.net/manual/en/language.operators.comparison.php
What's happening is that when comparing a string to a number, php is
converting the string (in this case 'D') to a number. Because 'D' isn't
a (base 10) number, it treats it as the number 0. And thus 0 == 0
returns true.
Please feel free to report any additional issues you come across. Thanks
again!
** Changed in: php5 (Ubuntu)
Status: New => Invalid
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to php5 in Ubuntu.
https://bugs.launchpad.net/bugs/928550
Title:
PHP Comparison Issues ... 0 equates to 'D'
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/php5/+bug/928550/+subscriptions
More information about the Ubuntu-server-bugs
mailing list