debug_backtrace() returns information only about last call #15
Ссылка в новой задаче
Block a user
Удалить ветку «%!s()»
Удаление ветки необратимо. Несмотря на то, что удаленная ветка может просуществовать некоторое время перед тем, как она будет окончательно удалена, это действие НЕВОЗМОЖНО отменить в большинстве случаев. Продолжить?
Aer Information
4c81475afbYour problem description
debug_backtrace() does not return information all information as in PHP. See example code:
Expected result (from PHP):
array(2) {
[0] =>
array(4) {
'file' =>
string(8) "test.php"
'line' =>
int(8)
'function' =>
string(4) "test"
'args' =>
array(0) {
}
}
[1] =>
array(4) {
'file' =>
string(8) "test.php"
'line' =>
int(11)
'function' =>
string(1) "a"
'args' =>
array(0) {
}
}
}
Current results
It is possible to retrieve all functions
testandabut the VM holds only a bytecode sequence at a time, the last used, thus it will returns 11 in this case for both.