summaryrefslogtreecommitdiff
path: root/ext/opcache/tests/assign_obj_op_of_fetch_dim.phpt
blob: 1cc55b40010e1c00d609f18baf38b8adf406b0b2 (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 array key 0 in %s on line %d
Attempt to assign property "y" on null