[ Index ]

PHP Cross Reference of phpBB-3.3.14-deutsch

title

Body

[close]

/vendor/symfony/debug/Resources/ext/tests/ -> 002.phpt (source)

   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  )


Generated: Mon Nov 25 19:05:08 2024 Cross-referenced by PHPXref 0.7.1