title: How to get number of lines with SplFileObject?
body: <pre><code>$file = new SplFileObject('/path/to/file.txt');
  </code></pre>
  
  <p>How can I find the number of lines in a file with <a href="http://php.net/splfileobject"><code>SplFileObject</code></a>?</p>