File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
Zend /
tests /
bug30828.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:47:52 2012 UTC (13 years, 1 month ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
1: --TEST--
2: Bug #30828 (debug_backtrace() reports incorrect class in overridden methods)
3: --FILE--
4: <?php
5: class A {
6: function __construct() {
7: debug_print_backtrace();
8: $bt = debug_backtrace();
9: foreach ($bt as $t) {
10: print $t['class'].$t['type'].$t['function']."\n";
11: }
12: }
13:
14: function foo() {
15: debug_print_backtrace();
16: $bt = debug_backtrace();
17: foreach ($bt as $t) {
18: print $t['class'].$t['type'].$t['function']."\n";
19: }
20: }
21:
22: static function bar() {
23: debug_print_backtrace();
24: $bt = debug_backtrace();
25: foreach ($bt as $t) {
26: print $t['class'].$t['type'].$t['function']."\n";
27: }
28: }
29: }
30:
31: class B extends A {
32: function __construct() {
33: parent::__construct();
34: }
35:
36: function foo() {
37: parent::foo();
38: }
39:
40: static function bar() {
41: parent::bar();
42: }
43: }
44:
45: $b = new B();
46: $b->foo();
47: B::bar();
48: ?>
49: --EXPECTF--
50: #0 A->__construct() called at [%sbug30828.php:30]
51: #1 B->__construct() called at [%sbug30828.php:42]
52: A->__construct
53: B->__construct
54: #0 A->foo() called at [%sbug30828.php:34]
55: #1 B->foo() called at [%sbug30828.php:43]
56: A->foo
57: B->foo
58: #0 A::bar() called at [%sbug30828.php:38]
59: #1 B::bar() called at [%sbug30828.php:44]
60: A::bar
61: B::bar
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>