debug_backtrace()
function debug_backtrace(int $options = 1, int $limit = 0): array
Generates a PHP backtrace for the active call stack.
Parameters:
$options(int), default1, optional$limit(int), default0, optional
Returns: array
Availability
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported through a declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/core/debug_backtrace.rs).
No examples yet. Check examples/ and showcases/ for usage patterns.
Internals
For how debug_backtrace is implemented in the compiler, see the internals page.