src/Util/U.php
public static function getCaller($count=1)
    {
        $dbts=debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS,6+$count);
        if ( ! is_array($dbts) || count($dbts) < 2 ) return null;
        if ( ! isset($dbts[0]['file']) ) return null;
        $myfile = $dbts[0]['file'];
        $retval = '';
        foreach($dbts as $dbt) {
            if ( ! isset($dbt['file']) ) continue;
            if ( ! isset($dbt['line']) ) continue;
            if ( $myfile != $dbt['file'] ) {
                if ( strlen($retval) > 0 ) $retval .= " ";
                $retval.= $dbt['file'].':'.$dbt['line'];
                $count--;
                if ( $count < 1 ) return $retval;
            }
        }
        return $retval;
    }
public static function getCaller($count=1)
    {
        $dbts=debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS,6+$count);
        if ( ! is_array($dbts) || count($dbts) < 2 ) return null;
        if ( ! isset($dbts[0]['file']) ) return null;
        $myfile = $dbts[0]['file'];
        $retval = '';
        foreach($dbts as $dbt) {
            if ( ! isset($dbt['file']) ) continue;
            if ( ! isset($dbt['line']) ) continue;
            if ( $myfile != $dbt['file'] ) {
                if ( strlen($retval) > 0 ) $retval .= " ";
                $retval.= $dbt['file'].':'.$dbt['line'];
                $count--;
                if ( $count < 1 ) return $retval;
            }
        }
        return $retval;
    }
public static function getCaller ( $ count = 1 ) { $ dbts = debug_backtrace ( DEBUG_BACKTRACE_IGNORE_ARGS , 6 + $ count ) ; if ( ! is_array ( $ dbts ) || count ( $ dbts ) < 2 ) return null ; if ( ! isset ( $ dbts [ 0 ] [ 'file' ] ) ) return null ; $ myfile = $ dbts [ 0 ] [ 'file' ] ; $ retval = '' ; foreach ( $ dbts as $ dbt ) { if ( ! isset ( $ dbt [ 'file' ] ) ) continue ; if ( ! isset ( $ dbt [ 'line' ] ) ) continue ; if ( $ myfile != $ dbt [ 'file' ] ) { if ( strlen ( $ retval ) > 0 ) $ retval .= " " ; $ retval .= $ dbt [ 'file' ] . ':' . $ dbt [ 'line' ] ; $ count -- ; if ( $ count < 1 ) return $ retval ; } } return $ retval ; }
Need to replicate the code or U.php will be in the traceback
Need to replicate the code or U . php will be in the traceback