$a = NULL;
$t = microtime(true);
for($i = 0; $i<10000000; $i++) {
if ($a) {} }
print microtime(true)-$t."\n"; //2.84 sec
$t = microtime(true);
for($i = 0; $i<10000000; $i++) {
if ($a==true) {} }
print microtime(true)-$t."\n"; //3.52sec
$t = microtime(true);
for($i = 0; $i<10000000; $i++) {
if ($a===true) {} }
print microtime(true)-$t."\n"; //3.0 sec
$t = microtime(true);
for($i = 0; $i<10000000; $i++) {
if (isset($a)) {} }
print microtime(true)-$t; //3.08 sec
$t = microtime(true);
for($i = 0; $i<10000000; $i++) {
if ($a) {} }
print microtime(true)-$t."\n"; //2.84 sec
$t = microtime(true);
for($i = 0; $i<10000000; $i++) {
if ($a==true) {} }
print microtime(true)-$t."\n"; //3.52sec
$t = microtime(true);
for($i = 0; $i<10000000; $i++) {
if ($a===true) {} }
print microtime(true)-$t."\n"; //3.0 sec
$t = microtime(true);
for($i = 0; $i<10000000; $i++) {
if (isset($a)) {} }
print microtime(true)-$t; //3.08 sec
No comments:
Post a Comment