note 92332 deleted from language.types.null by danbrown
| From: | danbrown@php.net | Date: | Mon, 20 Jul 2009 11:23:05 +0000 |
| Subject: | note 92332 deleted from language.types.null by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-158497@lists.php.net to get a copy of this message | ||
Note Submitter: andras at billinger dot us
----
Hi i modified James's speedtest,
$v = NULL;
$s = microtime(TRUE);
for($i=0; $i<1000; $i++) {
is_null($v);
}
print "is_null : <br />";
print ( microtime(TRUE)-$s ) * 1000;
print "<br>";
$s = microtime(TRUE);
for($i=0; $i<1000; $i++) {
unset($v);
}
print "unset : <br />";
print ( microtime(TRUE)-$s ) * 1000;
print "<br>";
$s = microtime(TRUE);
for($i=0; $i<1000; $i++) {
$v===NULL;
}
print "= = = : <br />";
print ( microtime(TRUE)-$s ) * 1000;
?>
And the output is:
is_null :
0.33712387085
unset :
0.130891799927
= = = :
0.694036483765