1--TEST--
2SPL: ArrayObject::__construct basic usage.
3--FILE--
4<?php
5echo "--> No arguments:\n";
6var_dump(new ArrayObject());
7
8echo "--> Object argument:\n";
9$a = new stdClass;
10$a->p = 'hello';
11var_dump(new ArrayObject($a));
12
13echo "--> Array argument:\n";
14var_dump(new ArrayObject(array('key1' => 'val1')));
15
16echo "--> Nested ArrayObject argument:\n";
17var_dump(new ArrayObject(new ArrayObject($a)));
18?>
19--EXPECTF--
20--> No arguments:
21object(ArrayObject)#1 (1) {
22  ["storage":"ArrayObject":private]=>
23  array(0) {
24  }
25}
26--> Object argument:
27object(ArrayObject)#2 (1) {
28  ["storage":"ArrayObject":private]=>
29  object(stdClass)#1 (1) {
30    ["p"]=>
31    string(5) "hello"
32  }
33}
34--> Array argument:
35object(ArrayObject)#2 (1) {
36  ["storage":"ArrayObject":private]=>
37  array(1) {
38    ["key1"]=>
39    string(4) "val1"
40  }
41}
42--> Nested ArrayObject argument:
43object(ArrayObject)#2 (1) {
44  ["storage":"ArrayObject":private]=>
45  object(ArrayObject)#3 (1) {
46    ["storage":"ArrayObject":private]=>
47    object(stdClass)#1 (1) {
48      ["p"]=>
49      string(5) "hello"
50    }
51  }
52}
53