Skip to content

Commit 01a29c3

Browse files
committed
ext/standard/var.c: show unset properties
1 parent dfe9ab7 commit 01a29c3

22 files changed

+86
-45
lines changed

Zend/tests/019.phpt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1237,15 +1237,23 @@ object(Point)#%d (3) {
12371237
["lable"]=>
12381238
string(6) "Point1"
12391239
}
1240-
object(Point)#%d (2) {
1240+
object(Point)#%d (3) {
1241+
["x"]=>
1242+
unset
12411243
["y"]=>
12421244
int(40)
12431245
["lable"]=>
12441246
string(6) "Point1"
12451247
}
12461248
bool(false)
12471249
bool(true)
1248-
object(Point)#%d (0) {
1250+
object(Point)#%d (3) {
1251+
["x"]=>
1252+
unset
1253+
["y"]=>
1254+
unset
1255+
["lable"]=>
1256+
unset
12491257
}
12501258
bool(true)
12511259
bool(false)

Zend/tests/ctor_promotion_untyped_default.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ var_dump(new B);
2121

2222
?>
2323
--EXPECT--
24-
object(B)#1 (1) {
24+
object(B)#1 (2) {
2525
["untyped"]=>
2626
NULL
2727
["typed"]=>

Zend/tests/type_declarations/typed_properties_037.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ $foo = new class {
99
var_dump($foo);
1010
?>
1111
--EXPECTF--
12-
object(class@anonymous)#%d (1) {
12+
object(class@anonymous)#%d (2) {
1313
["bar"]=>
1414
int(10)
1515
["qux"]=>

Zend/tests/type_declarations/typed_properties_052.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ $obj = new A;
1818
var_dump($obj);
1919
?>
2020
--EXPECT--
21-
object(A)#1 (0) {
21+
object(A)#1 (6) {
2222
["a1"]=>
2323
uninitialized(A)
2424
["b1"]=>

Zend/tests/type_declarations/typed_properties_059.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ $x = new A;
1717
var_dump($x);
1818
?>
1919
--EXPECT--
20-
object(A)#1 (0) {
20+
object(A)#1 (4) {
2121
["a2"]=>
2222
uninitialized(int)
2323
["b2"]=>

Zend/tests/type_declarations/typed_properties_072.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var_dump($test->val);
1818

1919
?>
2020
--EXPECT--
21-
object(Test)#1 (0) {
21+
object(Test)#1 (1) {
2222
["val"]=>
2323
uninitialized(int)
2424
}

Zend/tests/type_declarations/typed_properties_073.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,20 @@ var_dump($test, $val);
2323

2424
?>
2525
--EXPECT--
26-
object(Test)#1 (1) {
26+
object(Test)#1 (2) {
2727
["prop"]=>
2828
string(2) "42"
2929
["val"]=>
3030
uninitialized(int)
3131
}
3232
int(42)
33-
object(Test)#1 (1) {
33+
object(Test)#1 (2) {
3434
["prop"]=>
3535
&int(42)
3636
["val"]=>
3737
uninitialized(int)
3838
}
39-
object(Test)#1 (1) {
39+
object(Test)#1 (2) {
4040
["prop"]=>
4141
&string(1) "x"
4242
["val"]=>

Zend/tests/type_declarations/typed_properties_074.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ var_dump($test->prop);
2626

2727
?>
2828
--EXPECT--
29-
object(Test)#1 (1) {
29+
object(Test)#1 (2) {
3030
["prop"]=>
3131
&string(1) "x"
3232
["val"]=>
3333
uninitialized(int)
3434
}
3535
Value of type string returned from Test::__get() must be compatible with unset property Test::$val of type int
36-
object(Test)#1 (1) {
36+
object(Test)#1 (2) {
3737
["prop"]=>
3838
&string(1) "x"
3939
["val"]=>

Zend/tests/type_declarations/typed_properties_086.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ var_dump($t);
2020

2121
?>
2222
--EXPECT--
23-
object(T)#1 (1) {
23+
object(T)#1 (2) {
2424
["i"]=>
2525
uninitialized(int)
2626
["1"]=>

Zend/tests/type_declarations/typed_properties_093.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var_dump($test);
2525
?>
2626
--EXPECT--
2727
Cannot assign string to property Test::$prop of type int
28-
object(Test)#2 (0) {
28+
object(Test)#2 (1) {
2929
["prop"]=>
3030
uninitialized(int)
3131
}

0 commit comments

Comments
 (0)