Bug #60086 [Opn->Bgs]: leading zeros used in array gives problems
Edit report at https://bugs.php.net/bug.php?id=60086&edit=1
ID: 60086
Updated by: cataphract@php.net
Reported by: bartdeliefde at gmail dot com
Summary: leading zeros used in array gives problems
-Status: Open
+Status: Bogus
Type: Bug
Package: Arrays related
PHP Version: 5.3.8
Block user comment: N
Private report: N
New Comment:
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 http://www.php.net/support.php 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.
Previous Comments:
------------------------------------------------------------------------
[2011-10-18 13:45:58] bartdeliefde at gmail dot com
Description:
------------
leading zeros used in arrays gives problems
.
Test script:
---------------
<?php
$a="a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z";
$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'
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60086&edit=1
Thread (2 messages)