Its objects are likely to cause bloating. Try passing false functions so that you donβt stretch objects and your traces will be much smaller.
EDIT: If passing false does not work, then if you are using PHP 5.3.6+, you can use a bitmask to restrict the returned function. It looks like you have objects that are passed as huge arguments.
http://php.net/manual/en/function.debug-backtrace.php Link
In addition, if you are using PHP 5.4.0+, they have added a second parameter, which will allow you to limit the number of stack frames.
EDIT2: total < HACK β here, but it works ... add try / catch, throw an exception and catch it, then convert to a string or call getTraceAsString () exception to get the full stack. Example:
try { throw new Exception('ignore this string'); } catch(Exception $e) { $trace = $e->getTrace();
In the above snippet, you can use $trace and create your own output, or simply use the standard exception as the string $str . Itβs easier to get the output of the stack frame.
source share