Annotation of embedaddon/php/Zend/tests/bug64239_2.phpt, revision 1.1
1.1 ! misho 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:
! 10: class B {
! 11: use T2 { t2method as Bmethod; }
! 12: }
! 13:
! 14: class C extends A {
! 15: }
! 16:
! 17: trait T1 {
! 18: protected function backtrace() {
! 19: $b = new B();
! 20: $b->Bmethod();
! 21: }
! 22: }
! 23: trait T2 {
! 24: public function t2method() {
! 25: print_r(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1));
! 26: }
! 27: }
! 28: $a = new A();
! 29: $a->test();
! 30:
! 31: $c = new C();
! 32: $c->test();
! 33: ?>
! 34: --EXPECTF--
! 35: Array
! 36: (
! 37: [0] => Array
! 38: (
! 39: [file] => %sbug64239_2.php
! 40: [line] => %d
! 41: [function] => Bmethod
! 42: [class] => B
! 43: [type] => ->
! 44: )
! 45:
! 46: )
! 47: Array
! 48: (
! 49: [0] => Array
! 50: (
! 51: [file] => %sbug64239_2.php
! 52: [line] => %d
! 53: [function] => Bmethod
! 54: [class] => B
! 55: [type] => ->
! 56: )
! 57:
! 58: )
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>