File tree 2 files changed +60
-52
lines changed
ext/standard/tests/general_functions
2 files changed +60
-52
lines changed Original file line number Diff line number Diff line change @@ -15,18 +15,7 @@ $a = $b;
15
15
16
16
var_dump (error_get_last ());
17
17
18
- function trigger_fatal_error_with_stacktrace () {
19
- ini_set ('fatal_error_backtraces ' , true );
20
-
21
- eval ("class Foo {}; class Foo {} " );
22
- }
23
-
24
- register_shutdown_function (function () {
25
- var_dump (error_get_last ());
26
- echo "Done \n" ;
27
- });
28
-
29
- trigger_fatal_error_with_stacktrace ();
18
+ echo "Done \n" ;
30
19
?>
31
20
--EXPECTF--
32
21
NULL
@@ -44,44 +33,4 @@ array(4) {
44
33
["line"]=>
45
34
int(11)
46
35
}
47
-
48
- Fatal error: Cannot redeclare class Foo (%s) in %s on line %d
49
- Stack trace:
50
- #0 %serror_get_last.php(%d): eval()
51
- #1 %serror_get_last.php(%d): trigger_fatal_error_with_stacktrace()
52
- #2 {main}
53
- array(5) {
54
- ["type"]=>
55
- int(64)
56
- ["message"]=>
57
- string(%d) "Cannot redeclare class Foo %s"
58
- ["file"]=>
59
- string(%d) "%serror_get_last.php(%d) : eval()'d code"
60
- ["line"]=>
61
- int(%d)
62
- ["trace"]=>
63
- array(2) {
64
- [0]=>
65
- array(3) {
66
- ["file"]=>
67
- string(%d) "%serror_get_last.php"
68
- ["line"]=>
69
- int(%d)
70
- ["function"]=>
71
- string(%d) "eval"
72
- }
73
- [1]=>
74
- array(4) {
75
- ["file"]=>
76
- string(%d) "%serror_get_last.php"
77
- ["line"]=>
78
- int(%d)
79
- ["function"]=>
80
- string(%d) "trigger_fatal_error_with_stacktrace"
81
- ["args"]=>
82
- array(0) {
83
- }
84
- }
85
- }
86
- }
87
36
Done
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ error_get_last() w/ fatal error
3
+ --INI--
4
+ fatal_error_backtraces=On
5
+ --FILE--
6
+ <?php
7
+
8
+ function trigger_fatal_error_with_stacktrace () {
9
+ eval ("class Foo {}; class Foo {} " );
10
+ }
11
+
12
+ register_shutdown_function (function () {
13
+ var_dump (error_get_last ());
14
+ echo "Done \n" ;
15
+ });
16
+
17
+ trigger_fatal_error_with_stacktrace ();
18
+ ?>
19
+ --EXPECTF--
20
+ Fatal error: Cannot redeclare class Foo (%s) in %s on line %d
21
+ Stack trace:
22
+ #0 %serror_get_last_002.php(%d): eval()
23
+ #1 %serror_get_last_002.php(%d): trigger_fatal_error_with_stacktrace()
24
+ #2 {main}
25
+ array(5) {
26
+ ["type"]=>
27
+ int(64)
28
+ ["message"]=>
29
+ string(%d) "Cannot redeclare class Foo %s"
30
+ ["file"]=>
31
+ string(%d) "%serror_get_last_002.php(%d) : eval()'d code"
32
+ ["line"]=>
33
+ int(%d)
34
+ ["trace"]=>
35
+ array(2) {
36
+ [0]=>
37
+ array(3) {
38
+ ["file"]=>
39
+ string(%d) "%serror_get_last_002.php"
40
+ ["line"]=>
41
+ int(%d)
42
+ ["function"]=>
43
+ string(%d) "eval"
44
+ }
45
+ [1]=>
46
+ array(4) {
47
+ ["file"]=>
48
+ string(%d) "%serror_get_last_002.php"
49
+ ["line"]=>
50
+ int(%d)
51
+ ["function"]=>
52
+ string(%d) "trigger_fatal_error_with_stacktrace"
53
+ ["args"]=>
54
+ array(0) {
55
+ }
56
+ }
57
+ }
58
+ }
59
+ Done
You can’t perform that action at this time.
0 commit comments