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