Skip to content

Commit a9da402

Browse files
committed
Naming restriction applies (except for integers)
1 parent 5217c6f commit a9da402

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

Diff for: ext/standard/tests/class_object/get_object_vars_variation_005.phpt

+3-16
Original file line numberDiff line numberDiff line change
@@ -7,40 +7,27 @@ get_object_vars() no-declared/declared discrepancies
77
class 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;
1815
var_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;
2520
var_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
}

0 commit comments

Comments
 (0)