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