Obtains the correct stack frame in the full backtrace.

@return array
340259
protected function trace()
    {
        foreach (\array_reverse($this->backtrace) as $stackFrame) {
            if ($this->isDebugCall($stackFrame)) {
                return $stackFrame;
            }
        }

        return \end($this->backtrace);
    }
409866
static public function backtrace($deep=0)
    {
        $bt = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, $deep + 1);
        if (isset($bt[$deep])) {
            return $bt[$deep];
        }

        return array();
    }
1194921
private function getBacktraceUse()
    {
        $debugBacktrace = collect(debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, 30))->filter(function ($backtrace) {
            $backtraceClass = (isset($backtrace['class'])) ? $backtrace['class'] : null;

            return $backtraceClass === $this->listenClass;
        })->first();
        $checkBacktrace = null;
        $backtraceFile = (isset($debugBacktrace['file'])) ? $debugBacktrace['file'] : null;
        $backtraceFunction = (isset($debugBacktrace['function'])) ? $debugBacktrace['function'] : null;
        if (!is_null($debugBacktrace) && str_contains($backtraceFile, 'Illuminate/Database/Eloquent/SoftDeletingScope.php') && $backtraceFunction == 'update') {
            $checkBacktrace = [
                'object'   => $debugBacktrace['object'],
                'function' => $debugBacktrace['function'],
                'args'     => $debugBacktrace['args'][0],
            ];
        }

        return $checkBacktrace;
    }
645900
function getStackTraceArray() {
  var origStackTraceLimit = Error.stackTraceLimit
  var origPrepareStackTrace = Error.prepareStackTrace

  // Collect all stack frames.
  Error.stackTraceLimit = Infinity

  // Get a structured stack trace as an `Array` of `CallSite` objects, each of which represents a stack frame, with frames for native Node functions and this file removed.
  Error.prepareStackTrace = function (error, structuredStackTrace) {
    return structuredStackTrace.filter(function (frame) {
      var filePath = frame.getFileName()

      // Skip frames from within this module (i.e., `dantil`).
      if (filePath === __filename) {
        return false
      }

      // Skip frames for native Node functions (e.g., `require()`).
      if (!/\//.test(filePath)) {
        return false
      }

      return true
    })
  }

  // Collect the stack trace.
  var stack = Error().stack

  // Restore stack trace configuration after collecting stack trace.
  Error.stackTraceLimit = origStackTraceLimit
  Error.prepareStackTrace = origPrepareStackTrace

  return stack
}
125913
protected function getContext()
    {
        $trace = debug_backtrace();

        $file = isset($trace[2]['file'])
            ? $trace[2]['file']
            : ''
        ;

        $line = isset($trace[2]['line'])
            ? $trace[2]['line']
            : ''
        ;

        return [
            'file' => $file,
            'line' => $line,
        ];
    }
739791
public function getScope() {
		$calledHere = $this->backTrace[$this->backTraceOffset+1];

		if (isset($calledHere['class'])) {
			return (object) array(
				'type' => 'Method',
				'name' => $calledHere['class'].$calledHere['type'].$calledHere['function']
			);
		} elseif(isset($calledHere['function'])) {
			return (object) array(
				'type' => 'Function',
				'name' => $calledHere['function']
			);
		} else {
			return (object) array(
				'type' => 'global'
			);
		}
	}
112795
public function getStack() {
        $stack = array();

        $preMicroTime = NULL;
        foreach ($this->timeline as $index => $item) {
            if ($preMicroTime === NULL) {
                $preMicroTime = $item['time'];
            }
            $internalTime = $item['time'] - $preMicroTime;
            $internalTime = round($internalTime/10, 1);

            $stack[] = sprintf('[#%d - %sms%s]%s(%d)',
                $index, 
                $internalTime, 
                $item['tag'] !== NULL ? ' - ' . $item['tag'] : '', 
                $item['file'], 
                $item['line']
            );
        }

        return $stack;
    }
556321
function getBacktrace($frame = null)
    {
        if (defined('PEAR_IGNORE_BACKTRACE')) {
            return null;
        }
        if ($frame === null) {
            return $this->backtrace;
        }
        return $this->backtrace[$frame];
    }
106209
public static function trace(array $stack) {
		$result = [];

		foreach ($stack as $frame) {
			if (isset($frame['function'])) {
				if (isset($frame['class'])) {
					$result[] = trim($frame['class'], '\\') . '::' . $frame['function'];
				} else {
					$result[] = $frame['function'];
				}
			}
		}
		return $result;
	}
176583
public static function caller()
    {
        $bt = debug_backtrace();
        $caller = isset($bt[2]) ? $bt[2] : array();
        $caller['line'] = $bt[1]['line'];
        $caller['file'] = $bt[1]['file'];
        if (!isset($caller['class'])) {
            $caller['class'] = '';
        }
        if (!isset($caller['type'])) {
            $caller['type'] = '';
        }
        if (!isset($caller['function'])) {
            $caller['function'] = '';
        }
        return $caller;
    }
81080
@Override
    public StackTraceElement[] getStackTrace() {
        ArrayList<StackTraceElement> stackTrace = new ArrayList<>();
        
        for (Throwable exception : exceptions) {
            stackTrace.addAll(Arrays.asList(exception.getStackTrace()));
        }
        
        return stackTrace.toArray(new StackTraceElement[stackTrace.size()]);
    }
1096468
private function loadReturnsOfThisFunction(): array
    {
        $returnPositions = TokenHelper::findNextAll(
            $this->file->getBaseFile(),
            [T_RETURN],
            $this->stackPos + 1,
            $this->token['scope_closer']
        );

        return array_filter($returnPositions, function (int $returnPos): bool {
            $possibleClosure = $this->file->findPrevious([T_CLOSURE, T_FUNCTION], $returnPos - 1, $this->stackPos);

            return $possibleClosure === $this->stackPos;
        });
    }
1193811
protected function getBacktrace() {
            $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);

            if (empty($trace)) {
                // @codeCoverageIgnoreStart
                return [];
                // @codeCoverageIgnoreEnd
            } else {
                foreach ($trace as $k => $v) {
                    foreach (self::$ignoredFiles as $i) {
                        if (stripos(Alo::ifnull($v['file'], ''), $i) !== false) {
                            unset($trace[$k]);
                            break;
                        }
                    }
                }
            }

            return array_values($trace);
        }
8452
public function getFallbackLocales()
    {
        if ($this->translator instanceof Translator || method_exists($this->translator, 'getFallbackLocales')) {
            return $this->translator->getFallbackLocales();
        }

        return [];
    }
1217469
private function formatBacktrace() {

		$backtrace = $this -> error -> getBacktrace();
		
		if(null !== $backtrace) {

			array_shift($backtrace);
			array_shift($backtrace);

			foreach($backtrace as $index => $stack) {

				foreach(['type', 'args'] as $type) {

					if(true === isset($backtrace[$index][$type])) {
						unset($backtrace[$index][$type]);
					}
				}
			}
		}

		return $backtrace;
	}
599807
public function stackData()
    {
        $http = $this->initStackSession();

        $data = null;
        if (!$this->isDataPersisted() || $this->stackAlwaysUseSessionStorage) {
            $data = $this->getData();
        } elseif ($this->data === null) {
            $this->collect();
        }

        $stack = $http->getSessionValue($this->stackSessionNamespace);
        $stack[$this->getCurrentRequestId()] = $data;
        $http->setSessionValue($this->stackSessionNamespace, $stack);
        return $this;
    }
1341616
private function filterStackTrace($stackTrace)
    {
        return array_values(
            array_filter($stackTrace, function ($st) {
                return !array_key_exists('class', $st) || substr($st['class'], 0, 16) != 'OpenCensus\Trace';
            })
        );
    }