1--TEST--
2Assign by reference to backed property is forbidden for &get-only
3--FILE--
4<?php
5
6class Foo {
7    private $_bar;
8    public $bar {
9        &get {
10            echo __METHOD__, PHP_EOL;
11            return $this->_bar;
12        }
13    }
14}
15
16$foo = new Foo;
17$foo->bar = 'bar';
18
19?>
20--EXPECTF--
21Fatal error: Uncaught Error: Property Foo::$bar is read-only in %s:%d
22Stack trace:
23#0 {main}
24  thrown in %s on line %d
25