src/Debugger/Dumper.php
private static function findLocation(): ?array
    {
        foreach (\debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS) as $item) {
            if (isset($item['class']) && $item['class'] === __CLASS__) {
                $location = $item;
                continue;
            }

            if (isset($item['function'])) {
                try {
                    $reflection = isset($item['class'])
                        ? new \ReflectionMethod($item['class'], $item['function'])
                        : new \ReflectionFunction($item['function']);
                    if ($reflection->isInternal() || \preg_match('#\s@tracySkipLocation\s#',
                            (string) $reflection->getDocComment())) {
                        $location = $item;
                        continue;
                    }
                } catch (\ReflectionException $e) {
                }
            }
            break;
        }

        if (isset($location['file'], $location['line']) && \is_file($location['file'])) {
            $lines = \file($location['file']);
            $line = $lines[$location['line'] - 1];

            return [
                $location['file'],
                $location['line'],
                \trim(\preg_match('#\w*dump(er::\w+)?\(.*\)#i', $line, $m) ? $m[0] : $line),
            ];
        }

        return null;
    }
private static function findLocation(): ?array
    {
        foreach (\debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS) as $item) {
            if (isset($item['class']) && $item['class'] === __CLASS__) {
                $location = $item;
                continue;
            }

            if (isset($item['function'])) {
                try {
                    $reflection = isset($item['class'])
                        ? new \ReflectionMethod($item['class'], $item['function'])
                        : new \ReflectionFunction($item['function']);
                    if ($reflection->isInternal() || \preg_match('#\s@tracySkipLocation\s#',
                            (string) $reflection->getDocComment())) {
                        $location = $item;
                        continue;
                    }
                } catch (\ReflectionException $e) {
                }
            }
            break;
        }

        if (isset($location['file'], $location['line']) && \is_file($location['file'])) {
            $lines = \file($location['file']);
            $line = $lines[$location['line'] - 1];

            return [
                $location['file'],
                $location['line'],
                \trim(\preg_match('#\w*dump(er::\w+)?\(.*\)#i', $line, $m) ? $m[0] : $line),
            ];
        }

        return null;
    }
private static function findLocation ( ) : ? array { foreach ( \ debug_backtrace ( DEBUG_BACKTRACE_IGNORE_ARGS ) as $ item ) { if ( isset ( $ item [ 'class' ] ) && $ item [ 'class' ] === __CLASS__ ) { $ location = $ item ; continue ; } if ( isset ( $ item [ 'function' ] ) ) { try { $ reflection = isset ( $ item [ 'class' ] ) ? new \ ReflectionMethod ( $ item [ 'class' ] , $ item [ 'function' ] ) : new \ ReflectionFunction ( $ item [ 'function' ] ) ; if ( $ reflection -> isInternal ( ) || \ preg_match ( '#\s@tracySkipLocation\s#' , ( string ) $ reflection -> getDocComment ( ) ) ) { $ location = $ item ; continue ; } } catch ( \ ReflectionException $ e ) { } } break ; } if ( isset ( $ location [ 'file' ] , $ location [ 'line' ] ) && \ is_file ( $ location [ 'file' ] ) ) { $ lines = \ file ( $ location [ 'file' ] ) ; $ line = $ lines [ $ location [ 'line' ] - 1 ] ; return [ $ location [ 'file' ] , $ location [ 'line' ] , \ trim ( \ preg_match ( '#\w*dump(er::\w+)?\(.*\)#i' , $ line , $ m ) ? $ m [ 0 ] : $ line ) , ] ; } return null ; }
Finds the location where dump was called.

@return array|null [file, line, code]
Finds the location where dump was called .