|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60086 leading zeros used in array gives problems
Submitted: 2011-10-18 13:45 UTC Modified: 2011-10-18 15:03 UTC
From: bartdeliefde at gmail dot com Assigned:
Status: Not a bug Package: Arrays related
PHP Version: 5.3.8 OS:
Private report: No CVE-ID: None
 [2011-10-18 13:45 UTC] bartdeliefde at gmail dot com
leading zeros used in arrays gives problems

Test script:

	$array_alphabet = array();
	$array_alphabet = explode(",",$a);
	echo $array_alphabet[09]; 
//gives me the first element instead of the tenth, $array_alphabet[9] works fine

Expected result:
echo $array_alphabet[09];  expected to give me 'j'

Actual result:
but is gives me 'a'


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-10-18 15:03 UTC]
-Status: Open +Status: Bogus
 [2011-10-18 15:03 UTC]
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

Leading zeros are for octal notation.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sun Jul 03 04:05:44 2022 UTC