php-src/Zend/tests/bug67169.phpt
Nikita Popov 69b5ee61d0 Fixed bug #67169: []= after_array_splice incorrect
This fixes a regression I introduced in beta 1.
2014-05-02 12:49:51 +02:00

27 lines
371 B
PHP

--TEST--
Bug #67169: array_splice all elements, then []= gives wrong index
--FILE--
<?php
$array = array('a', 'b');
array_splice($array, 0, 2);
$array[] = 'c';
var_dump($array);
$array = array('a', 'b');
array_shift($array);
array_shift($array);
$array[] = 'c';
var_dump($array);
?>
--EXPECT--
array(1) {
[0]=>
string(1) "c"
}
array(1) {
[0]=>
string(1) "c"
}