File tree Expand file tree Collapse file tree 2 files changed +3
-20
lines changed
Expand file tree Collapse file tree 2 files changed +3
-20
lines changed Original file line number Diff line number Diff line change @@ -30,25 +30,9 @@ class stdClass#55 (3) {
3030If you require recursive merging of child objects, that is also possible:
3131
3232``` php
33- $o1 = json_decode(<<<JSON
34- {
35- " key" : [ " one" ]
36- }
37- JSON
38- );
39- $o2 = json_decode( <<<JSON
40- {
41- " key" : [ " two" ]
42- }
43- JSON
44- );
45-
46- $o3 = json_decode( <<<JSON
47- {
48- " key" : [ " three" ]
49- }
50- JSON
51- );
33+ $o1 = json_decode('{"key": ["one"]}');
34+ $o2 = json_decode('{"key": ["two"]}');
35+ $o3 = json_decode('{"key": ["three"]}');
5236
5337$out = object_merge_recursive($o1, $o2, $o3);
5438
Original file line number Diff line number Diff line change @@ -138,7 +138,6 @@ public function testObjectMerge()
138138 $ actual = ObjectMerge::merge ($ root , ...$ others );
139139 }
140140 $ this ->assertEquals ($ expected , $ actual );
141- var_dump ($ actual );
142141 }
143142 }
144143}
You can’t perform that action at this time.
0 commit comments