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