1--TEST--
2Assign by reference to backed property is forbidden for &get-only
3--FILE--
4<?php
5
6class Test {
7    public $prop = 0 {
8        &get {
9            echo __METHOD__, "\n";
10            return $this->prop;
11        }
12    }
13}
14
15$test = new Test();
16$test->prop = &$ref;
17
18?>
19--EXPECTF--
20Test::$prop::get
21
22Fatal error: Uncaught Error: Cannot assign by reference to overloaded object in %s:%d
23Stack trace:
24#0 {main}
25  thrown in %s on line %d
26