PHP odd error message "next element is already occupied"?
When we do something like:
$arr = array();
$arr[PHP_INT_MAX] = null;
$arr[] = null;
PHP gives the error message:
Warning: Cannot add element to the array as the next element is already
occupied in /home/yca/script.php on line 4
Why does the engine say that the next element is already occupied?
Is this a PHP bug?
 
No comments:
Post a Comment