title: PHP readfile() how to handle return value
body: <p>I'm learning PHP so this is the question for education purposes. Since I can't find an answer in tutorials I use, would be nice from you to make it clear for me.</p>
  
  <p>So, imagine we have a file "text.txt" and content is:</p>
  
  <pre><code>"Hello World!"
  </code></pre>
  
  <p>The following PHP script:</p>
  
  <pre><code>&lt;?php
  
  echo readfile("text.txt");
  
  ?&gt;
  </code></pre>
  
  <p>Will output "Hello World!12" - I can't think of any cases when such an output can be useful, but I found that if I don't want to see the file length at the end, I've to omit "echo":</p>
  
  <pre><code>&lt;?php
  
  readfile("text.txt");
  
  ?&gt;
  </code></pre>
  
  <p>The output will be "Hello World!". This is a way better, but manual says: "Returns the number of bytes read from the file.", so my question is - How am I supposed to get the file length using the readfile() function? According to my logic it "returns" the file content but I feel like I didn't get something right. Please help me to figure this out.</p>