comparison vendor/symfony/debug/Resources/ext/tests/002.phpt @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children 7a779792577d
comparison
equal deleted inserted replaced
-1:000000000000 0:4c8ae668cc8c
1 --TEST--
2 Test symfony_debug_backtrace in case of fatal error
3 --SKIPIF--
4 <?php if (!extension_loaded('symfony_debug')) print 'skip'; ?>
5 --FILE--
6 <?php
7
8 function bar()
9 {
10 foo();
11 }
12
13 function foo()
14 {
15 notexist();
16 }
17
18 function bt()
19 {
20 print_r(symfony_debug_backtrace());
21 }
22
23 register_shutdown_function('bt');
24
25 bar();
26
27 ?>
28 --EXPECTF--
29 Fatal error: Call to undefined function notexist() in %s on line %d
30 Array
31 (
32 [0] => Array
33 (
34 [function] => bt
35 [args] => Array
36 (
37 )
38
39 )
40
41 [1] => Array
42 (
43 [file] => %s
44 [line] => %d
45 [function] => foo
46 [args] => Array
47 (
48 )
49
50 )
51
52 [2] => Array
53 (
54 [file] => %s
55 [line] => %d
56 [function] => bar
57 [args] => Array
58 (
59 )
60
61 )
62
63 )