View difference between Paste ID: fMhhdQiW and RBKRV41A
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";
7
8
9
?>
10-
3.4707100391388 - 0
10+
3.4698710441589 - 0
11-
3.1234660148621 - 1
11+
3.1269850730896 - 1
12-
3.9550409317017 - 0
12+
3.8833770751953 - !0
13-
4.4936611652374 - 1
13+
4.4716360569 - !1