"Fossies" - the Fresh Open Source Software Archive

Member "phplist-3.5.6/public_html/lists/base/vendor/symfony/symfony/src/Symfony/Component/Debug/Resources/ext/tests/002.phpt" (24 Jul 2020, 918 Bytes) of package /linux/www/phplist-3.5.6.tgz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 --TEST--
    2 Test symfony_debug_backtrace in case of fatal error
    3 --SKIPIF--
    4 <?php if (!extension_loaded('symfony_debug')) {
    5     echo 'skip';
    6 } ?>
    7 --FILE--
    8 <?php
    9 
   10 function bar()
   11 {
   12     foo();
   13 }
   14 
   15 function foo()
   16 {
   17     notexist();
   18 }
   19 
   20 function bt()
   21 {
   22     print_r(symfony_debug_backtrace());
   23 }
   24 
   25 register_shutdown_function('bt');
   26 
   27 bar();
   28 
   29 ?>
   30 --EXPECTF--
   31 Fatal error: Call to undefined function notexist() in %s on line %d
   32 Array
   33 (
   34     [0] => Array
   35         (
   36             [function] => bt
   37             [args] => Array
   38                 (
   39                 )
   40 
   41         )
   42 
   43     [1] => Array
   44         (
   45             [file] => %s
   46             [line] => %d
   47             [function] => foo
   48             [args] => Array
   49                 (
   50                 )
   51 
   52         )
   53 
   54     [2] => Array
   55         (
   56             [file] => %s
   57             [line] => %d
   58             [function] => bar
   59             [args] => Array
   60                 (
   61                 )
   62 
   63         )
   64 
   65 )