debug_backtrace

Supported Versions: PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8
Generates a backtrace
<?php debug_backtrace(int $options = DEBUG_BACKTRACE_PROVIDE_OBJECT, int $limit = 0): array
<?php     {

        $current = null;



        foreach (debug_backtrace(self::BACKTRACE_OPTIONS) as $trace) {

            assert(array_key_exists(self::FILE, $trace));



            $traceFile = str_replace(DIRECTORY_SEPARATOR, '/', $trace[self::FILE]);
<?php     {

        $current = null;



        foreach (debug_backtrace(self::BACKTRACE_OPTIONS) as $trace) {

            assert(array_key_exists(self::FILE, $trace));



            $traceFile = str_replace(DIRECTORY_SEPARATOR, '/', $trace[self::FILE]);
<?php     private static function backtrace(): array

    {

        $backtrace = debug_backtrace(self::BACKTRACE_OPTIONS);



        foreach ($backtrace as $trace) {

            if (! isset($trace['file'])) {