Throwable::getTrace

(PHP 7)

Throwable::getTraceGets the stack trace

설명

abstract public array Throwable::getTrace ( void )

Returns the stack trace as an array.

인수

이 함수는 인수가 없습니다.

반환값

Returns the stack trace as an array in the same format as debug_backtrace().

참고

add a note add a note

User Contributed Notes 1 note

up
0
rasmus at mindplay dot dk
11 months ago
Note that, where `debug_backtrace()` accepts an argument, which lets you configure options for the backtrace, `getTrace()` has no such argument.

Whether the `getTrace` method captures arguments instead depends on the `zend.exception_ignore_args` INI setting, which must be set to `0` ahead of time, before an exception occurs. (notice the confusing double negation here - to *enable* capture of arguments, you must *disable* this INI flag.)

Unlike `debug_backtrace()`, the `getTrace` method does not appear to capture the `object` value.
To Top