php-src/Zend/tests/bug29896.phpt
Nikita Popov de6e401e05
Use common formatting for backtraces (#6977)
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.
2021-05-18 11:43:37 +02:00

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')