php-src/ext/spl/tests/bug52861.phpt
Mike Willbanks 61099f8585 Bug #52861: unset fails with ArrayObject and deep arrays
When checking to make into a reference write, readwrite are checked but not unset
2013-02-26 22:11:52 -08:00

23 lines
381 B
PHP

--TEST--
Bug #52861 (unset failes with ArrayObject and deep arrays)
--FILE--
<?php
$arrayObject = new ArrayObject(array('foo' => array('bar' => array('baz' => 'boo'))));
unset($arrayObject['foo']['bar']['baz']);
print_r($arrayObject->getArrayCopy());
?>
--EXPECT--
Array
(
[foo] => Array
(
[bar] => Array
(
)
)
)