002.phpt 911 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. )