File tree 1 file changed +50
-0
lines changed
1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change 28
28
} catch (\Throwable $ e ) {
29
29
echo (string ) $ e . "\n" ;
30
30
}
31
+
32
+ try {
33
+ $ a = new class () extends A {
34
+ public function __debugInfo (): array
35
+ {
36
+ new class () {
37
+ public function __destruct ()
38
+ {
39
+ throw new \Exception ('z_wo_assign ' );
40
+ }
41
+ };
42
+
43
+ return ['foo ' => 2 ];
44
+ }
45
+ };
46
+ print_r ($ a );
47
+ } catch (\Throwable $ e ) {
48
+ echo (string ) $ e . "\n" ;
49
+ }
50
+
51
+ try {
52
+ $ a = new class () extends A {
53
+ public function __debugInfo (): array
54
+ {
55
+ $ o = new class () {
56
+ public function __destruct ()
57
+ {
58
+ throw new \Exception ('z_w_assign ' );
59
+ }
60
+ };
61
+
62
+ return ['foo ' => 2 ];
63
+ }
64
+ };
65
+ print_r ($ a );
66
+ } catch (\Throwable $ e ) {
67
+ echo (string ) $ e . "\n" ;
68
+ }
31
69
?>
32
70
--EXPECTF--
33
71
Error: x in %s:6
@@ -41,3 +79,15 @@ Stack trace:
41
79
#0 [internal function]: A@anonymous->__debugInfo()
42
80
#1 %s(24): print_r(Object(A@anonymous), true)
43
81
#2 {main}
82
+
83
+ Exception: z_wo_assign in %s:35
84
+ Stack trace:
85
+ #0 [internal function]: A@anonymous->__destruct()
86
+ #1 %s(42): print_r(Object(A@anonymous))
87
+ #2 {main}
88
+
89
+ Exception: z_w_assign in %s:54
90
+ Stack trace:
91
+ #0 [internal function]: A@anonymous->__destruct()
92
+ #1 %s(61): print_r(Object(A@anonymous))
93
+ #2 {main}
You can’t perform that action at this time.
0 commit comments