002.phpt 918 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. function bar()
  10. {
  11. foo();
  12. }
  13. function foo()
  14. {
  15. notexist();
  16. }
  17. function bt()
  18. {
  19. print_r(symfony_debug_backtrace());
  20. }
  21. register_shutdown_function('bt');
  22. bar();
  23. ?>
  24. --EXPECTF--
  25. Fatal error: Call to undefined function notexist() in %s on line %d
  26. Array
  27. (
  28. [0] => Array
  29. (
  30. [function] => bt
  31. [args] => Array
  32. (
  33. )
  34. )
  35. [1] => Array
  36. (
  37. [file] => %s
  38. [line] => %d
  39. [function] => foo
  40. [args] => Array
  41. (
  42. )
  43. )
  44. [2] => Array
  45. (
  46. [file] => %s
  47. [line] => %d
  48. [function] => bar
  49. [args] => Array
  50. (
  51. )
  52. )
  53. )