1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 01:02:25 +01:00
Files
archived-php-src/ext/spl/tests/fixedarray_008.phpt
Gabriel Caruso 4aabfe911e Revert "Update versions for PHP 8.0.21"
This reverts commit 6eedacdf15.
2022-07-06 12:06:48 +02:00

31 lines
362 B
PHP

--TEST--
SPL: FixedArray: Assigning the itself object testing the reference
--FILE--
<?php
$b = 3;
$a = new SplFixedArray($b);
$a[0] = 1;
$a[1] = 2;
$a[2] = $a;
$a[2][0] = 3;
foreach ($a as $x) {
if (is_object($x)) {
var_dump($x[0]);
} else {
var_dump($x);
}
}
var_dump($a->getSize());
?>
--EXPECT--
int(3)
int(2)
int(3)
int(3)