php-src/ext/spl/tests/bug31346.phpt
2005-12-21 22:21:54 +00:00

22 lines
437 B
PHP
Executable File

--TEST--
Bug #31486 (ArrayIterator::next segfaults)
--SKIPIF--
<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
<?php
$obj = new stdClass;
$obj->var1=1;
$ao = new ArrayObject($obj);
$i = $ao->getIterator();
$ao->offsetUnset($i->key());
$i->next();
?>
===DONE===
--EXPECTF--
Notice: ArrayIterator::next(): Array was modified outside object and internal position is no longer valid in %sbug31346.php on line %d
===DONE===