mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
de6e401e05
This makes debug_print_backtrace() use the same formatting as exception backtraces. The only difference is that the final #{main} is omitted, because it wouldn't make sense for limited backtraces, and wasn't there previously either.
28 lines
501 B
PHP
28 lines
501 B
PHP
--TEST--
|
|
Bug #29896 (Backtrace argument list out of sync)
|
|
--FILE--
|
|
<?php
|
|
function userErrorHandler($num, $msg, $file, $line)
|
|
{
|
|
debug_print_backtrace();
|
|
}
|
|
|
|
$OldErrorHandler = set_error_handler("userErrorHandler");
|
|
|
|
function GenerateError1($A1)
|
|
{
|
|
$a = $b;
|
|
}
|
|
|
|
function GenerateError2($A1)
|
|
{
|
|
GenerateError1("Test1");
|
|
}
|
|
|
|
GenerateError2("Test2");
|
|
?>
|
|
--EXPECTF--
|
|
#0 %s(%d): userErrorHandler(2, 'Undefined varia...', '%s', %d)
|
|
#1 %s(%d): GenerateError1('Test1')
|
|
#2 %s(%d): GenerateError2('Test2')
|