blob: d3b31436bda07b4165709a507f73d742f2a3ac3a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
--TEST--
Bug #79155: Property nullability lost when using multiple property definition
--FILE--
<?php
class Foo {
public ?string $a, $b;
public ?stdClass $c, $d;
}
$t = new Foo;
$t->a = "str";
$t->b = "str";
$t->c = new stdClass;
$t->d = new stdClass;
var_dump($t->a, $t->b, $t->c, $t->d);
$t->a = null;
$t->b = null;
$t->c = null;
$t->d = null;
var_dump($t->a, $t->b, $t->c, $t->d);
?>
--EXPECT--
string(3) "str"
string(3) "str"
object(stdClass)#2 (0) {
}
object(stdClass)#3 (0) {
}
NULL
NULL
NULL
NULL
|