Include array with numeric keys

I have a strange problem when including a file.

The incoming file contains a log, and the content (exactly) looks like this:

<?php 
$fxe[20150518123308982711]='test 1';
$fxe[20150518123346582251]='test 2';
$fxe[20150518123545868736]='test 3';

      

Keys are composed of year + month + day + hour + min + sec + random input

I expected to $fxe

have 3 entries after including the file :

[20150518123308982711] => test 1
[20150518123346582251] => test 2
[20150518123545868736] => test 3

      

However, $fxe

it only contains 1 entry:

[0] => test 3

...

It is strange if - in an included file - I do keystrings instead of numeric ones

<?php 
    $fxe['20150518123308982711']='test 1';
    $fxe['20150518123346582251']='test 2';
    $fxe['20150518123545868736']='test 3';

      

it returns all 3 records correctly.

Can anyone explain why this is happening?

+3


source to share


1 answer


Simple, your keys are bigger than PHP_INT_MAX



+4


source







All Articles