bug64239_2.phpt 899 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. --TEST--
  2. Bug #64239 (debug_backtrace() changed behavior)
  3. --FILE--
  4. <?php
  5. class A {
  6. use T1;
  7. public function test() { $this->backtrace(); }
  8. }
  9. class B {
  10. use T2 { t2method as Bmethod; }
  11. }
  12. class C extends A {
  13. }
  14. trait T1 {
  15. protected function backtrace() {
  16. $b = new B();
  17. $b->Bmethod();
  18. }
  19. }
  20. trait T2 {
  21. public function t2method() {
  22. print_r(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1));
  23. }
  24. }
  25. $a = new A();
  26. $a->test();
  27. $c = new C();
  28. $c->test();
  29. ?>
  30. --EXPECTF--
  31. Array
  32. (
  33. [0] => Array
  34. (
  35. [file] => %sbug64239_2.php
  36. [line] => %d
  37. [function] => Bmethod
  38. [class] => B
  39. [type] => ->
  40. )
  41. )
  42. Array
  43. (
  44. [0] => Array
  45. (
  46. [file] => %sbug64239_2.php
  47. [line] => %d
  48. [function] => Bmethod
  49. [class] => B
  50. [type] => ->
  51. )
  52. )