ID: 31061
Updated by: [EMAIL PROTECTED]
Reported By: matjaz dot ostroversnik at ztm dot si
-Status: Open
+Status: Bogus
Bug Type: Class/Object related
Operating System: FC
PHP Version: 5.0.2
New Comment:
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same.
Thank you for your interest in PHP.
Duplicate of #30828.
Previous Comments:
------------------------------------------------------------------------
[2004-12-11 17:37:39] matjaz dot ostroversnik at ztm dot si
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]
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31061&edit=1