eval.in

Paste #94131

PHP — PHP 5.5.1, pasted 2 months ago

1
2
3
4
5
<?php

var_dump(array_fill(2147483645, 3, 'hi'));

var_dump(array_fill(2147483646, 3, 'hi'));

Program Output

array(3) {
  [2147483645]=>
  string(2) "hi"
  [2147483646]=>
  string(2) "hi"
  [2147483647]=>
  string(2) "hi"
}

Warning: array_fill(): Cannot add element to the array as the next element is already occupied in /tmp/execpad-4558d6d8d7b9/source-4558d6d8d7b9 on line 5
bool(false)

OK (0.008 sec real, 0.008 sec wall, 14 MB, 60 syscalls)

Fork