title: How to check if a text file is empty in PHP?
body: <p>How to check if a text file is empty in PHP?</p>
  
  <p>I've tried what I found on the internet which is this:</p>
  
  <pre><code>if( '' != filesize('data.txt')){
  
      echo "The file is empty";
  }
  </code></pre>
  
  <p>ALSO THIS:</p>
  
  <pre><code>if( 0 != filesize('data.txt')){
  
      echo "The file is empty";
  }
  </code></pre>
  
  <p>And no of them seems to work.</p>