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

29 lines
415 B
PHP

--TEST--
Don't recurse into USE_OTHER when checking for STD_PROP_LIST
--FILE--
<?php
$a = new ArrayObject([1, 2, 3], ArrayObject::STD_PROP_LIST);
$a->prop = 'a';
$b = new ArrayObject($a, 0);
$b->prop = 'b';
var_dump((array) $b);
$c = new ArrayObject($a);
$c->prop = 'c';
var_dump((array) $c);
?>
--EXPECT--
array(3) {
[0]=>
int(1)
[1]=>
int(2)
[2]=>
int(3)
}
array(1) {
["prop"]=>
string(1) "c"
}