php-src/ext/spl/tests/fastarray_007.phpt

27 lines
284 B
Plaintext
Raw Normal View History

2008-06-07 14:10:21 +00:00
--TEST--
SPL: FastArray: Assigning the itself object
--FILE--
<?php
$b = 10;
$a = new SplFastArray($b);
try {
$a[1] = $a;
} catch (Exception $e) {
echo $e->getMessage(), "\n";
}
foreach ($a as $c) {
if ($c) {
echo $c->getSize(), "\n";
}
}
print "ok\n";
?>
--EXPECT--
10
ok