#34986 [NEW]: New object field for debug_backtrace() result

From: Date: Wed, 26 Oct 2005 04:53:59 +0000
Subject: #34986 [NEW]: New object field for debug_backtrace() result
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-87052@lists.php.net to get a copy of this message
From: sebastian@php.net Operating system: Irrelevant PHP version: 5.1.0RC3 PHP Bug Type: Feature/Change Request Bug description: New object field for debug_backtrace() result Description: ------------ For some Meta Programming it would be great if debug_backtrace() could return an [object] field (in addition to [class] that contains a reference to respective object. Reproduce code: --------------- <?php class A { private $b; public function __construct() { $this->b = new B; } public function aMethod() { $this->b->bMethod(); } } class B { public function bMethod() { print_r(debug_backtrace()); } } $a = new A; $a->aMethod(); ?> Expected result: ---------------- Array ( [0] => Array ( [file] => /home/sb/test.php [line] => 10 [function] => bMethod [class] => B [object] => <Object id #2> [type] => -> [args] => Array ( ) ) [1] => Array ( [file] => /home/sb/test.php [line] => 21 [function] => aMethod [class] => A [object] => <Object id #1> [type] => -> [args] => Array ( ) ) ) Actual result: -------------- Array ( [0] => Array ( [file] => /home/sb/test.php [line] => 10 [function] => bMethod [class] => B [type] => -> [args] => Array ( ) ) [1] => Array ( [file] => /home/sb/test.php [line] => 21 [function] => aMethod [class] => A [type] => -> [args] => Array ( ) ) ) -- Edit bug report at http://bugs.php.net/?id=34986&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34986&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34986&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34986&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=34986&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=34986&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34986&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34986&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34986&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34986&r=support Expected behavior: http://bugs.php.net/fix.php?id=34986&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34986&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34986&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=34986&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34986&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=34986&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34986&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34986&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34986&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34986&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34986&r=mysqlcfg

« previous php.bugs (#87052) next »