extend SplFileObject with fread method
<p>PHP5 introduced an object-oriented file wrapper, <strong>SplFileObject</strong>. I guess I just found out why hardly anybody is using it. It's purely line-oriented, there is no fread() method - which the corresponding frwite seemed to suggest.</p>

<p>So now I'm wondering if I can extend it. I'm however not sure what's the better workaround. SplFileObject is not particular helpful in tucking the file pointer ($fp) away - it's either a private attribute or ZE-internal resource. So how would I extend it to get a fread method?</p>

<ul>
<li>Implement fread() as string collecting <strong>loop with fgets()</strong>, with eventual seeking if only a specific size was requested and fgets read too far until the next \n line break.</li>
<li>Use a custom constructor, which opens the file a second time and stores a <strong>secondary file pointer</strong>, in case I want to call fread() instead of the parent class methods.</li>
</ul>

<p>I'd go for the fgets workaround loop, but it sounds cumbersome and slow and provides for more potential pitfalls. OTOH opening a secondary file pointer seems not a good approach either and needs a custom destructor too.</p>
