|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-08-12 23:08 UTC] tony2001@php.net
[2005-08-12 23:33 UTC] iblue at gmx dot net
[2005-08-12 23:39 UTC] tony2001@php.net
[2005-08-12 23:45 UTC] iblue at gmx dot net
[2005-08-13 00:14 UTC] tony2001@php.net
[2005-08-13 00:27 UTC] iblue at gmx dot net
[2005-08-13 00:31 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 09:00:01 2025 UTC |
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]