From: matjaz dot ostroversnik at ztm dot si
Operating system: FC
PHP version: 5.0.2
PHP Bug Type: Class/Object related
Bug description: debug_print_backtrace reports wrong classes
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 bug report at http://bugs.php.net/?id=31061&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31061&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=31061&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=31061&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=31061&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=31061&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=31061&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=31061&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=31061&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=31061&r=support
Expected behavior: http://bugs.php.net/fix.php?id=31061&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=31061&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=31061&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=31061&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31061&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=31061&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=31061&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=31061&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=31061&r=float
MySQL Configuration Error: http://bugs.php.net/fix.php?id=31061&r=mysqlcfg