From: marting dot dc at gmail dot com
Operating system: Windows and Linux
PHP version: 4.3.11
PHP Bug Type: *Math Functions
Bug description: Compare strings problem (I'm not good in english)
Description:
------------
When you try to compare an empty string with any number who begins with 09
or 08 (booth includes) it returns true.
I have it tested on Windows and Linux and it happends
(I'm Sorry for my English, it's very bad,I hope you to understand me)
Martín González
Reproduce code:
---------------
$string = false;
if ($string == 09) { echo "Match<br>\n"; }
if ($string == 08) { echo "Match<br>\n"; }
if ($string == 09547856) { echo "Match<br>\n"; }
if ($string == 08625131) { echo "Match<br>\n"; }
/*
It will return:
Match
Match
Match
Match
*/
Expected result:
----------------
Nothing
Actual result:
--------------
Match
Match
Match
Match
--
Edit bug report at http://bugs.php.net/?id=33461&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33461&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=33461&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=33461&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=33461&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=33461&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=33461&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=33461&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=33461&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=33461&r=support
Expected behavior: http://bugs.php.net/fix.php?id=33461&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=33461&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=33461&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=33461&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33461&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=33461&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=33461&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=33461&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=33461&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=33461&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=33461&r=mysqlcfg