blob: 2c070517781830c79f8dc60af19260fdbb8efe90 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
--TEST--
Type inference for $ary[$idx]->prop +=
--FILE--
<?php
function test() {
$ary = [];
$ary[0]->y += 2;
var_dump(is_object($ary[0]));
}
try {
test();
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECTF--
Notice: Undefined offset: 0 in %s on line %d
Attempt to assign property 'y' of non-object
|