View difference between Paste ID: RBKRV41A and MWkf9mJT
SHOW: | | - or go back to the newest paste.
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";
6+
$empty = true; $t = microtime(1); for ($i = 0; $i < 100000000; $i++) if(!empty($empty));echo microtime(1) - $t; echo " - !", (int) $empty, "\n";
7
8
9
?>
10
3.4707100391388 - 0
11
3.1234660148621 - 1
12
3.9550409317017 - 0
13
4.4936611652374 - 1