title: PHP intval vs floor
body: <p>Is there any difference between <code>floor()</code> and <code>intval()</code>? Though both returns the same results, is there any issue with regard to performance? Which of the two is faster? Which is the right php function to use if I just want to return the whole value only of a decimal?</p>
  
  <p>The goal here is to display 1999.99 to 1999, omitting the decimal value and only return the whole number.</p>
  
  <pre><code>$num = 1999.99;
  $formattedNum = number_format($num)."&lt;br&gt;";
  echo intval($num) . ' intval' . '&lt;br /&gt;';
  echo floor($num) . ' floor';
  </code></pre>