#21638 [Opn->Bgs]: Wrong values
| From: | derick@php.net | Date: | Tue, 14 Jan 2003 17:58:42 +0000 |
| Subject: | #21638 [Opn->Bgs]: Wrong values | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-30016@lists.php.net to get a copy of this message | ||
ID: 21638
Updated by: derick@php.net
Reported By: n.uni9@terra.com.br
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Windows XP Professional
PHP Version: 4.2.3
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
those are octal numbers... check the manual again.
Derick
Previous Comments:
------------------------------------------------------------------------
[2003-01-14 11:56:01] n.uni9@terra.com.br
<?php
$a = array(01,08,10,15,17,20);
$b = array(001,008,012,015,170,200);
for($i=0; $i<count($a); $i++) {
echo($i." - ".$a[$i]." - ".$b[$i]."<br>");
}
$c= 011;
echo("\$c = ".$c);
?>
## OUTPUT ##
0 - 1 - 1
1 - 0 - 0
2 - 10 - 10
3 - 15 - 13
4 - 17 - 170
5 - 20 - 200
$c = 9
-----------------------
All the numbers, from "8" to up, if preceded by zero, outputs another
value.
-----------------------
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=21638&edit=1