1--TEST--
2Exception thrown by __get() during =& assignment
3--FILE--
4<?php
5
6class Test {
7    private $x;
8    public function &__get($name) {
9        throw new Exception("Foobar");
10    }
11}
12
13$test = new Test;
14$y = 5;
15try {
16    $test->x =& $y;
17} catch (Exception $e) {
18    echo $e->getMessage(), "\n";
19}
20
21?>
22--EXPECT--
23Foobar
24