#29981 [Opn->Bgs]: '08'!=08

From: Date: Sat, 04 Sep 2004 23:08:33 +0000
Subject: #29981 [Opn->Bgs]: '08'!=08
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-65739@lists.php.net to get a copy of this message
ID: 29981 Updated by: eru@php.net Reported By: temp at oxygenws dot com -Status: Open +Status: Bogus Bug Type: *General Issues Operating System: Linux/Windows PHP Version: 5.0.0 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 Octal numbers are prefixed with a zero. Previous Comments: ------------------------------------------------------------------------ [2004-09-05 00:53:39] temp at oxygenws dot com Description: ------------ look at this code: ======================== <?php $num2='02'; $num8='08'; if($num2==02) echo '2'; echo "\n"; if($num8==08) echo '8'; ?> ======================== it is output: ======================== 2 ======================== but what is the difference between 02 and 08?! i think it is a bug! best regards, omid Reproduce code: --------------- <?php $num2='02'; $num8='08'; if($num2==02) echo '2'; echo "\n"; if($num8==08) echo '8'; ?> Expected result: ---------------- 2 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=29981&edit=1

« previous php.bugs (#65739) next »