1--TEST--
2ASSIGN_OBJ on null reference returned from __get()
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.file_update_protection=0
7--FILE--
8<?php
9class Test {
10    public $prop;
11    public function &__get($name) {
12        return $this->prop;
13    }
14}
15function test() {
16    $obj = new Test;
17    $obj->x->y = 1;
18}
19function test2() {
20    $obj = new Test;
21    $obj->x->y += 1;
22}
23try {
24    test();
25} catch (Error $e) {
26    echo $e->getMessage(), "\n";
27}
28try {
29    test2();
30} catch (Error $e) {
31    echo $e->getMessage(), "\n";
32}
33?>
34--EXPECT--
35Attempt to assign property "y" on null
36Attempt to assign property "y" on null
37