From: [EMAIL PROTECTED]
Operating system: Windows XP Professional
PHP version: 4.2.3
PHP Bug Type: Scripting Engine problem
Bug description: Wrong values
<?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 bug report at http://bugs.php.net/?id=21638&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=21638&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=21638&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=21638&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=21638&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=21638&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=21638&r=support
Expected behavior: http://bugs.php.net/fix.php?id=21638&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=21638&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=21638&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=21638&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21638&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=21638&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=21638&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=21638&r=gnused