1--TEST--
2Exceptions thrown into a rope must not leak
3--FILE--
4<?php
5
6class Obj {
7	function __get($x) {
8		throw new Exception();
9	}
10}
11
12try {
13	$x = new Obj;
14	$y = 0;
15	$r = "$y|$x->x|";
16	echo "should never be reached";
17} catch (Exception $e) {
18	echo "$e\n";
19}
20
21try {
22	$x = new Obj;
23	$y = 0;
24	$r = "$y$x->x|";
25	echo "should never be reached";
26} catch (Exception $e) {
27	echo "$e\n";
28}
29
30try {
31	$x = new Obj;
32	$y = 0;
33	$r = "$y|$y$x->x";
34	echo "should never be reached";
35} catch (Exception $e) {
36	echo "$e\n";
37}
38
39?>
40--EXPECTF--
41Exception in %s:%d
42Stack trace:
43#0 %s(%d): Obj->__get('x')
44#1 {main}
45Exception in %s:%d
46Stack trace:
47#0 %s(%d): Obj->__get('x')
48#1 {main}
49Exception in %s:%d
50Stack trace:
51#0 %s(%d): Obj->__get('x')
52#1 {main}
53