|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25531 Array can't behave.
Submitted: 2003-09-14 09:30 UTC Modified: 2003-09-14 09:36 UTC
Avg. Score:1.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: oswald at welho dot com Assigned:
Status: Not a bug Package: Arrays related
PHP Version: * OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: oswald at welho dot com
New email:
PHP Version: OS:


 [2003-09-14 09:30 UTC] oswald at welho dot com
Array can't fetch data with certain keys. No changes made in any important file. Tested also with version 4.3.2, same result.

Reproduce code:
$a = array('nothing', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12');
$b = $a[7];
$c = $a[07];
$d = $a[8];
$e = $a[08];
$f = $a[9];
$g = $a[09];
$h = $a[10];
$i = $a[10];
print("$b = $c, $d = $e, $f = $g, $h = $i"); // The print should be 7=7, 8=8, 9=9, 10=10 but no.

Expected result:
Array can't fetch data when key is 08 or 09. But when key is 07 or 10 it can. With numbers 7,8,9 and 10 it works nicely. If this behaviour is completely normal please feel free to send some insults to me.

Actual result:
Result is nothing.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-09-14 09:36 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

Numbers starting with '0' denote octal values. And therefore of course 08 and 09 are invalid.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sun Dec 04 01:03:48 2022 UTC