fork download
  1. <?php
  2.  
  3. define("START", microtime(TRUE));
  4.  
  5. $mesAtual = intval(date("m"));
  6.  
  7. define("MIDDLE", microtime(TRUE));
  8.  
  9. $mesAtual = (int) date("m");
  10.  
  11. define("END", microtime(TRUE));
  12.  
  13. echo "intval: ", MIDDLE - START, PHP_EOL;
  14. echo "type cast: ", END - MIDDLE, PHP_EOL;
Success #stdin #stdout 0.02s 83904KB
stdin
Standard input is empty
stdout
intval: 0.043507099151611
type cast: 3.814697265625E-6