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

35 lines
479 B
PHP

--TEST--
SPL: ArrayObject::__construct: Using object with shared properties
--FILE--
<?php
$y = 2;
$x = 1;
$a = array($y, $x);
$o = (object)$a;
$ao = new ArrayObject($o);
$ao->asort();
var_dump($a, $o, $ao);
?>
--EXPECT--
array(2) {
[0]=>
int(2)
[1]=>
int(1)
}
object(stdClass)#1 (2) {
["1"]=>
int(1)
["0"]=>
int(2)
}
object(ArrayObject)#2 (1) {
["storage":"ArrayObject":private]=>
object(stdClass)#1 (2) {
["1"]=>
int(1)
["0"]=>
int(2)
}
}