<?php
    
require_once('LineReader.php');

    try {
        
$obj = new LineReader('/etc/passwd');
        
        echo
'<h2>This illustrates reading a line from /etc/passwd</h2>';
        echo
'The line: <i>' . $obj->Get(18, false) . '</i><br />';
        echo
'A print_r() of the LineReader object:<pre>' . print_r($obj, true) . '</pre>';

    } catch (
Exception $e) {
        echo
$e->GetMessage();
    }
?>

<p>
    Caching is normally used unless turned off specifically by passing FALSE as the second argument to the constructor.
    This means you get a small speed increase when reading from larger files (if you re-read the same line).
</p>