note 41373 added to function.debug-backtrace
| From: | vpupkin at comcast dot net | Date: | Wed, 07 Apr 2004 23:24:50 +0000 |
| Subject: | note 41373 added to function.debug-backtrace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-67787@lists.php.net to get a copy of this message | ||
This function doesn't seem to work properly(as described above) with classes/objects (perhaps I
forgot to enable something in php.ini, but don't think so)
Here is an example:
<pre>
<?php
class A1 {
function A1() {
echo "A1\n";
}
}
class A2 extends A1 {
function A2_method() {
echo "A2\n";
}
}
A1::A1();
$a1 = new A1();
$a2 = new A2();
$a2->A2_method();
echo "\nBacktrace:\n";
print_r(debug_backtrace());
?>
</pre>
Result:
A1
A1
A1
A2
Backtrace:
Array
(
)
not what I expect
----
Manual Page -- http://www.php.net/manual/en/function.debug-backtrace.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+41373
Delete -- http://master.php.net/manage/user-notes.php?action=delete+41373&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+41373&report=yes
Search -- http://master.php.net/manage/user-notes.php