#27311 [Opn->Bgs]: array values are ignored wheb beginning with a 0 number
| From: | mgf@php.net | Date: | Wed, 18 Feb 2004 15:19:56 +0000 |
| Subject: | #27311 [Opn->Bgs]: array values are ignored wheb beginning with a 0 number | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-55145@lists.php.net to get a copy of this message | ||
ID: 27311
Updated by: mgf@php.net
Reported By: MichaelGlazer at quickenloans dot com
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: winxp
PHP Version: 4.3.4
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
Numbers beginning with 0 are taken as octal. 8 and 9 are not valid
octal digits, so 0891 is not actually a valid number.
Previous Comments:
------------------------------------------------------------------------
[2004-02-18 09:53:41] MichaelGlazer at quickenloans dot com
Description:
------------
Creating an array with hardcoded number values beginning with a number
0 does not save anything beyond the 0.
This is when done outside of any quotes, single or double.
It works fine when quotes are added to these numbers.
Reproduce code:
---------------
$a=array(
1980,
0891
);
print_r($a);
Expected result:
----------------
Array
(
[0] => 1980
[1] => 0891
)
Actual result:
--------------
Array
(
[0] => 1980
[1] => 0
)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=27311&edit=1