File tree Expand file tree Collapse file tree 1 file changed +3
-16
lines changed
ext/standard/tests/class_object Expand file tree Collapse file tree 1 file changed +3
-16
lines changed Original file line number Diff line number Diff line change @@ -7,40 +7,27 @@ get_object_vars() no-declared/declared discrepancies
77class Test {
88 public $ prop ;
99}
10-
1110// Using ArrayObject here to get around property name restrictions
1211
1312$ obj = new stdClass ;
1413$ ao = new ArrayObject ($ obj );
15- $ ao ["\0A \0b " ] = 42 ;
16- $ ao ["\0* \0b " ] = 24 ;
1714$ ao [12 ] = 6 ;
1815var_dump (get_object_vars ($ obj ));
1916
2017$ obj = new Test ;
2118$ ao = new ArrayObject ($ obj );
22- $ ao ["\0A \0b " ] = 42 ;
23- $ ao ["\0* \0b " ] = 24 ;
2419$ ao [12 ] = 6 ;
2520var_dump (get_object_vars ($ obj ));
2621
2722?>
28- --EXPECTF--
29- array(3) {
30- ["%0A%0b"]=>
31- int(42)
32- ["%0*%0b"]=>
33- int(24)
23+ --EXPECT--
24+ array(1) {
3425 [12]=>
3526 int(6)
3627}
37- array(4 ) {
28+ array(2 ) {
3829 ["prop"]=>
3930 NULL
40- ["%0A%0b"]=>
41- int(42)
42- ["%0*%0b"]=>
43- int(24)
4431 [12]=>
4532 int(6)
4633}
You can’t perform that action at this time.
0 commit comments