002.phpt 912 B

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