mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
Changed the value of nNextFreeElement in _zend_empty_array from 0 to ZEND_LONG_MIN. Fixes GH-11154 Closes GH-11157
19 lines
224 B
PHP
19 lines
224 B
PHP
--TEST--
|
|
Test empty arrays with first added index being negative
|
|
--FILE--
|
|
<?php
|
|
|
|
$a = [];
|
|
$a[-5] = "-5";
|
|
$a[] = "after -5";
|
|
|
|
var_dump($a);
|
|
?>
|
|
--EXPECT--
|
|
array(2) {
|
|
[-5]=>
|
|
string(2) "-5"
|
|
[-4]=>
|
|
string(8) "after -5"
|
|
}
|