Guest User

Untitled

a guest
Feb 7th, 2015
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.58 KB | None | 0 0
  1. <?php
  2.  
  3. $empty = false; $t = microtime(1); for ($i = 0; $i < 100000000; $i++) if(empty($empty));echo microtime(1) - $t; echo " - ", (int) $empty, "\n";
  4. $empty = true; $t = microtime(1); for ($i = 0; $i < 100000000; $i++) if(empty($empty));echo microtime(1) - $t; echo " - ", (int) $empty, "\n";
  5. $empty = false; $t = microtime(1); for ($i = 0; $i < 100000000; $i++) if(!empty($empty));echo microtime(1) - $t; echo " - !", (int) $empty, "\n";
  6. $empty = true; $t = microtime(1); for ($i = 0; $i < 100000000; $i++) if(!empty($empty));echo microtime(1) - $t; echo " - !", (int) $empty, "\n";
Advertisement
Add Comment
Please, Sign In to add comment