#34110 [Opn->Fbk]: debug_print_backtrace prints wrong arguments
| From: | tony2001@php.net | Date: | Fri, 12 Aug 2005 21:39:27 +0000 |
| Subject: | #34110 [Opn->Fbk]: debug_print_backtrace prints wrong arguments | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-83487@lists.php.net to get a copy of this message | ||
ID: 34110
Updated by: tony2001@php.net
Reported By: iblue at gmx dot net
-Status: Open
+Status: Feedback
Bug Type: Unknown/Other Function
Operating System: Linux
PHP Version: 5.0.4
New Comment:
I can't find any differencies between the expected result and what
you've just posted.
Previous Comments:
------------------------------------------------------------------------
[2005-08-12 23:33:19] iblue at gmx dot net
iblue@neandertal:~/php5-200508122030$ ./sapi/cli/php -q
~/public_html/bug.php
#0 errorhandler(2, Division by zero,
/home/iblue/public_html/the_engine/index.php, 8, Array ([x] => 20,[z]
=> 0)) called at [/home/iblue/public_html/the_engine/index.php:8]
#1 test(20, 0) called at
[/home/iblue/public_html/the_engine/index.php:6]
better, but not right ;)
------------------------------------------------------------------------
[2005-08-12 23:08:46] tony2001@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
------------------------------------------------------------------------
[2005-08-12 23:04:57] iblue at gmx dot net
Description:
------------
debug_print_backtrace() and debug_backtrace() give both the same wrong
results in combination with set_error_handler().
-----------------
php5 -v
PHP 5.0.4-1.dotdeb.2 (cli) (built: Jun 28 2005 12:17:46)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.4-dev, Copyright (c) 1998-2004 Zend Technologies
-----------------
Reproduce code:
---------------
<?php
set_error_handler("errorhandler");
function errorhandler($errno, $errstr, $errfile, $errline
{
debug_print_backtrace();
}
test(20,0);
function test($x,$z)
{
echo $x/$z;
}
?>
Expected result:
----------------
#0 errorhandler(2, Division by zero,
/home/iblue/public_html/the_engine/index.php, 8) called at
[/home/iblue/public_html/the_engine/index.php:8]
#1 test(20, 0) called at
[/home/iblue/public_html/the_engine/index.php:6]
Actual result:
--------------
#0 errorhandler() called at
[/home/iblue/public_html/the_engine/index.php:8]
#1 test() called at [/home/iblue/public_html/the_engine/index.php:8]
#2 test(2, Division by zero,
/home/iblue/public_html/the_engine/index.php, 8, Array ([x] => 20,[z]
=> 0)) called at [/home/iblue/public_html/the_engine/index.php:6]
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34110&edit=1