#33461 [Opn->Bgs]: Compare strings problem (I'm not good in english)

From: Date: Fri, 24 Jun 2005 08:10:59 +0000
Subject: #33461 [Opn->Bgs]: Compare strings problem (I'm not good in english)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-80951@lists.php.net to get a copy of this message
ID: 33461 Updated by: tony2001@php.net Reported By: marting dot dc at gmail dot com -Status: Open +Status: Bogus Bug Type: *Math Functions Operating System: Windows and Linux PHP Version: 4.3.11 New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php See here: http://www.php.net/manual/en/language.types.type-juggling.php Previous Comments: ------------------------------------------------------------------------ [2005-06-24 06:21:43] marting dot dc at gmail dot com 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 this bug report at http://bugs.php.net/?id=33461&edit=1

« previous php.bugs (#80951) next »