3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $var = null; $var = new stdClass(); $time1 = microtime(true); for ($i = 0; $i <= 1000000; $i++) { if (!$var) {} } $time1 = microtime(true) - $time1; //echo "Time using '!': $time1\n"; $time2 = microtime(true); for ($i = 0; $i <= 1000000; $i++) { if ($var === null) {} } $time2 = microtime(true) - $time2; //echo "Time using '===': $time2\n"; if ($time1 > $time2) echo '"===" was faster'; else echo ' "!" was faster';
Output for 4.3.0 - 4.3.2, 4.3.4, 4.3.10 - 4.3.11, 4.4.1 - 4.4.2, 4.4.4 - 4.4.6, 4.4.8 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
"===" was faster
Output for hhvm-3.10.0

Process exited with code 153.
Output for 4.3.3, 4.3.5 - 4.3.9, 4.4.0, 4.4.3, 4.4.7
"!" was faster