fork download
  1. <?php
  2. $totalTimeFunction=0;
  3. function f1()
  4. {
  5. $t1=microtime(true);
  6. for($i=0;$i<900;$i++)
  7. {}
  8. $t2=microtime(true);
  9. $p=($t2-$t1);
  10. $GLOBALS['totalTimeFunction']+=$p;
  11. }
  12.  
  13.  
  14. $t1=microtime(true);
  15. f1();
  16. $t2=microtime(true);
  17. $p=($t2-$t1);
  18. echo 'OutFunction='.$p."\n";
  19. echo 'inFunction='.$GLOBALS['totalTimeFunction']."\n";die;
Success #stdin #stdout 0.02s 24448KB
stdin
Standard input is empty
stdout
OutFunction=0.00014305114746094
inFunction=0.00012397766113281