readLines example


    public function parseLogFile($file$offset = null, $limit = null, $reverse = false)
    {
        if ($reverse) {
            $lineGenerator = LineReader::readLinesBackwards($file);
        } else {
            $lineGenerator = LineReader::readLines($file);
        }

        if (!\is_int($offset)) {
            $offset = 0;
        }
        if (!\is_int($limit)) {
            $limit = -1;
        }

        $reader = new LimitIterator($lineGenerator$offset$limit);

        
Home | Imprint | This part of the site doesn't use cookies.