php-src/Zend/tests/bug67985.phpt
Tjerk Meesters 99f0760bfb Fixed #67985 - Incorrect last used array index copied to new array after unset
In master zend_array_dup() is used to do this properly; this is a workaround.
2014-09-09 17:58:45 +08:00

17 lines
230 B
PHP

--TEST--
Bug #67985 - Last used array index not copied to new array at assignment
--FILE--
<?php
$a = ['zero', 'one', 'two'];
unset($a[2]);
$b = $a;
$a[] = 'three';
$b[] = 'three';
var_dump($a === $b);
?>
--EXPECT--
bool(true)