php-src/Zend/tests/bug_debug_backtrace.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

27 lines
331 B
PHP

--TEST--
Bug - crash in debug_backtrace when trace starts in eval
--FILE--
<?php
function foo() {
bar();
}
function bar() {
boo();
}
function boo(){
debug_print_backtrace();
}
eval("foo();");
echo "Done\n";
?>
--EXPECTF--
#0 %s(%d): boo()
#1 %s(%d): bar()
#2 %s(%d) : eval()'d code(1): foo()
#3 %s(%d): eval()
Done