#23379 [Opn->Bgs]: comparing "08" and "09" with 08 and 09 returns false
| From: | edink@php.net | Date: | Mon, 28 Apr 2003 09:33:10 +0000 |
| Subject: | #23379 [Opn->Bgs]: comparing "08" and "09" with 08 and 09 returns false | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-38534@lists.php.net to get a copy of this message | ||
ID: 23379
Updated by: edink@php.net
Reported By: oli dot brouckaert at i-services dot be
-Status: Open
+Status: Bogus
Bug Type: Strings related
Operating System: Windows XP
PHP Version: 4.3.0
New Comment:
Numbers with leading zeros are considered octal where 08 and 09 are not
allowed (and therefore evaluated as 0).
Previous Comments:
------------------------------------------------------------------------
[2003-04-28 04:09:08] oli dot brouckaert at i-services dot be
Hello
I've found a strange bug :
<?php
$string="01"; // and "02", "03", ... except "08" and
"09"
echo ($string == 01)?1:0; // shows 1
$string="08"; // also for "09" but not other numbers
echo ($string == 08)?1:0; // shows 0
?>
Olivier
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23379&edit=1