1
0
mirror of https://github.com/php/php-src.git synced 2026-03-27 17:52:16 +01:00
Files
archived-php-src/Zend/tests/bug26229.phpt
Marcus Boerger 717604ea70 Add more tests
2003-12-22 22:53:48 +00:00

21 lines
522 B
PHP
Executable File

--TEST--
Bug #26229 (getIterator() segfaults when it returns arrays or scalars)
--FILE--
<?php
class array_iterator implements IteratorAggregate {
public function getIterator() {
return array('foo', 'bar');
}
}
$obj = new array_iterator;
foreach ($obj as $property => $value) {
var_dump($value);
}
?>
===DONE===
--EXPECTF--
Warning: Objects returned by array_iterator::getIterator() must be traversable or implement interface Iterator in %sbug26229.php on line %d
===DONE===