#31061 [Opn->Bgs]: debug_print_backtrace reports wrong classes

From: Date: Wed, 12 Jan 2005 01:11:27 +0000
Subject: #31061 [Opn->Bgs]: debug_print_backtrace reports wrong classes
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-71901@lists.php.net to get a copy of this message
 ID:               31061
 Updated by:       tony2001@php.net
 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


Thread (2 messages)

« previous php.bugs (#71901) next »