|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-01-12 02:11 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 07:00:01 2025 UTC |
Description: ------------ debug_print_backtrace reports wrong class context in a constructor. Linux version 2.6.7-1.478 PHP 5.0.3RC1 and RC2 Reproduce code: --------------- <?php class a { function __construct () { echo ("this is a\n"); debug_print_backtrace(); } } class b extends a { function __construct () { echo ("this is b\n"); parent::__construct(); } } $x = new b(); ?> Expected result: ---------------- this is b this is a #0 a->__construct() called at [/home/ostri/xulapps/alf/php/cl_test.php:15] #1 b->__construct() called at [/home/ostri/xulapps/alf/php/cl_test.php:18] Actual result: -------------- this is b this is a #0 b->__construct() called at [/home/ostri/xulapps/alf/php/cl_test.php:15] #1 b->__construct() called at [/home/ostri/xulapps/alf/php/cl_test.php:18]