mirror of
https://github.com/php/php-src.git
synced 2025-01-10 21:14:37 +08:00
27 lines
286 B
PHP
27 lines
286 B
PHP
--TEST--
|
|
SPL: FixedArray: Assigning the itself object
|
|
--FILE--
|
|
<?php
|
|
|
|
$b = 10;
|
|
$a = new SplFixedArray($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
|