|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-04-14 09:21 UTC] jani@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 23 20:00:02 2025 UTC |
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