#47965 [Opn->Bgs]: is_null() is 4x slower than ===null
| From: | jani@php.net | Date: | Tue, 14 Apr 2009 09:21:23 +0000 |
| Subject: | #47965 [Opn->Bgs]: is_null() is 4x slower than ===null | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-135798@lists.php.net to get a copy of this message | ||
ID: 47965
Updated by: jani@php.net
Reported By: lunter at interia dot pl
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: winXP
PHP Version: 5.3.0RC1
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Previous Comments:
------------------------------------------------------------------------
[2009-04-14 09:07:04] lunter at interia dot pl
Description:
------------
is_null() is 4x slower than ===null
Reproduce code:
---------------
<?
$t=microtime(1);
for($z=0;$z<1e7;$z++){
if(is_null(1)){}
}
print(microtime(1)-$t);print('<br/>');
// ---
$t=microtime(1);
for($z=0;$z<1e7;$z++){
if(1===null){}
}
print(microtime(1)-$t);print('<br/>');
?>
Expected result:
----------------
is_null() is faster like ===null
Actual result:
--------------
is_null() is 4x slower than ===null
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47965&edit=1