note 92332 added to language.types.null
| From: | andras at billinger dot us | Date: | Mon, 20 Jul 2009 10:18:23 +0000 |
| Subject: | note 92332 added to language.types.null | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-158496@lists.php.net to get a copy of this message | ||
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
----
Server IP: 92.43.200.200
Probable Submitter: 84.2.76.55
----
Manual Page -- http://www.php.net/manual/en/language.types.null.php
Edit -- https://master.php.net/note/edit/92332
Del: integrated -- https://master.php.net/note/delete/92332/integrated
Del: useless -- https://master.php.net/note/delete/92332/useless
Del: bad code -- https://master.php.net/note/delete/92332/bad+code
Del: spam -- https://master.php.net/note/delete/92332/spam
Del: non-english -- https://master.php.net/note/delete/92332/non-english
Del: in docs -- https://master.php.net/note/delete/92332/in+docs
Del: other reasons-- https://master.php.net/note/delete/92332
Reject -- https://master.php.net/note/reject/92332
Search -- https://master.php.net/manage/user-notes.php