|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-01-25 10:49 UTC] requinix@php.net
-Status: Open
+Status: Not a bug
[2017-01-25 10:49 UTC] requinix@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 03:00:01 2025 UTC |
Description: ------------ array key with a leading 0 and any digit except for 8 or 9 will not result in Parse error! This have bin sens php 7.0+ Test script: --------------- $a = array(00=>'OK',01=>'OK',02=>'OK',03=>'OK',04=>'OK',05=>'OK',06=>'OK',07=>'OK',10=>'OK',18=>'OK',19=>'OK'); #$b = array(08=>'08',09=>'09',018=>'018',019=>'019'); print_r($a); Expected result: ---------------- Parse error: Invalid numeric literal in X on line Y Actual result: -------------- Array ( [0] => OK [1] => OK [2] => OK [3] => OK [4] => OK [5] => OK [6] => OK [7] => OK [10] => OK [18] => OK [19] => OK )