xref: /PHP-8.3/ext/spl/tests/fixedarray_007.phpt (revision f8d79582)
1--TEST--
2SPL: FixedArray: Assigning the itself object
3--FILE--
4<?php
5
6$b = 10;
7$a = new SplFixedArray($b);
8
9try {
10    $a[1] = $a;
11} catch (Exception $e) {
12    echo $e->getMessage(), "\n";
13}
14
15foreach ($a as $c) {
16    if ($c) {
17        echo $c->getSize(), "\n";
18    }
19}
20
21print "ok\n";
22
23?>
24--EXPECT--
2510
26ok
27