title: SplFileObject vs fopen in PHP
body: <p>What are the pros and cons of using <code>fopen</code> as opposed to <code>SplFileObject</code> in PHP?</p>
  
  <p>From what I see, <code>SplFileObject</code> throws exceptions where applicable which makes this convenient when using <code>try...catch</code> for error handling. Apart from this, are there any other reasons to recommend one over the other?</p>
  
  <p>(Bonus: Why is it called <code>SplFileObject</code>? What does <code>Spl</code> stand for? Why not simply <code>FileObject</code>?)</p>
  
  <p><strong>Update:</strong> One limitation of the <code>SplFileObject</code> is that it does not (yet) have a <code>close</code> member function. In some scenarios this can be a problem (Example: <a href="https://stackoverflow.com/questions/6066145/unlink-and-splfileobject">Unlink and SplFileObject</a>). </p>