src/Analysis/Debugger.php
protected static function _findPos($file, $callLine)
    {
        $len = strlen($file);
        $line = 1;
        $i = 0;

        while ($i < $len) {
            if ($file[$i] === "\n") {
                $line++;
            }
            if ($line === $callLine) {
                return $i;
            }
            $i++;
        }
    }
protected static function _findPos($file, $callLine)
    {
        $len = strlen($file);
        $line = 1;
        $i = 0;

        while ($i < $len) {
            if ($file[$i] === "\n") {
                $line++;
            }
            if ($line === $callLine) {
                return $i;
            }
            $i++;
        }
    }
protected static function _findPos ( $ file , $ callLine ) { $ len = strlen ( $ file ) ; $ line = 1 ; $ i = 0 ; while ( $ i < $ len ) { if ( $ file [ $ i ] === "\n" ) { $ line ++ ; } if ( $ line === $ callLine ) { return $ i ; } $ i ++ ; } }
Return the first character position of a specific line in a file.

@param  string  $file     A file content.
@param  integer $callLine The number of line to find.
@return mixed             Returns the character position or null if not found.
Return the first character position of a specific line in a file .