3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php error_reporting(E_ALL); $iterations = 1000000; $start = microtime(true); for ($i=0; $i<$iterations; $i++) { $page = @$_GET['page'] ?: 'home'; } $suppressedTime = round(microtime(true) - $start, 8); $start = microtime(true); for ($i=0; $i<$iterations; $i++) { $page = isset($_GET['page']) ? $_GET['page'] : 'home'; } $issetTime = round(microtime(true) - $start, 8); echo "results for {$iterations} iterations:\n\n"; echo "suppressed time: {$suppressedTime}\n"; echo "isset time: {$issetTime}\n\n"; echo "speed difference: " . round(100 / $suppressedTime * $issetTime, 2) . "%";
based on 0b47S
Output for 7.1.0
results for 1000000 iterations: suppressed time: 0.25327277 isset time: 0.02574301 speed difference: 10.16%
Output for 7.0.14
results for 1000000 iterations: suppressed time: 0.24642992 isset time: 0.03671503 speed difference: 14.9%
Output for 7.0.6
results for 1000000 iterations: suppressed time: 0.20622396 isset time: 0.02652812 speed difference: 12.86%
Output for 7.0.5
results for 1000000 iterations: suppressed time: 0.17811918 isset time: 0.02659392 speed difference: 14.93%
Output for 7.0.4
results for 1000000 iterations: suppressed time: 0.192523 isset time: 0.02646494 speed difference: 13.75%
Output for 7.0.3
results for 1000000 iterations: suppressed time: 0.207515 isset time: 0.02770281 speed difference: 13.35%
Output for 7.0.2
results for 1000000 iterations: suppressed time: 0.19447088 isset time: 0.03015089 speed difference: 15.5%
Output for 7.0.1
results for 1000000 iterations: suppressed time: 0.21787095 isset time: 0.02656198 speed difference: 12.19%
Output for 7.0.0
results for 1000000 iterations: suppressed time: 0.18719602 isset time: 0.02581286 speed difference: 13.79%
Output for hhvm-3.12.0
results for 1000000 iterations: suppressed time: 0.11571717 isset time: 0.080863 speed difference: 69.88%
Output for hhvm-3.10.0
results for 1000000 iterations: suppressed time: 0.37892294 isset time: 0.13326001 speed difference: 35.17%
Output for 5.6.28
results for 1000000 iterations: suppressed time: 0.42057896 isset time: 0.05758905 speed difference: 13.69%
Output for 5.6.21
results for 1000000 iterations: suppressed time: 0.30169296 isset time: 0.06830692 speed difference: 22.64%
Output for 5.6.20
results for 1000000 iterations: suppressed time: 0.31602979 isset time: 0.06760001 speed difference: 21.39%
Output for 5.6.19
results for 1000000 iterations: suppressed time: 0.28854179 isset time: 0.0670979 speed difference: 23.25%
Output for 5.6.18
results for 1000000 iterations: suppressed time: 0.29647684 isset time: 0.06752896 speed difference: 22.78%
Output for 5.6.17
results for 1000000 iterations: suppressed time: 0.285568 isset time: 0.06520104 speed difference: 22.83%
Output for 5.6.16
results for 1000000 iterations: suppressed time: 0.31919003 isset time: 0.07068491 speed difference: 22.15%
Output for 5.6.15
results for 1000000 iterations: suppressed time: 0.31206393 isset time: 0.07031798 speed difference: 22.53%
Output for 5.6.14
results for 1000000 iterations: suppressed time: 0.31368399 isset time: 0.06738806 speed difference: 21.48%
Output for 5.6.13
results for 1000000 iterations: suppressed time: 0.31296587 isset time: 0.06746507 speed difference: 21.56%
Output for 5.6.12
results for 1000000 iterations: suppressed time: 0.31867099 isset time: 0.06717992 speed difference: 21.08%
Output for 5.6.11
results for 1000000 iterations: suppressed time: 0.31429386 isset time: 0.0674541 speed difference: 21.46%
Output for 5.6.10
results for 1000000 iterations: suppressed time: 0.30498981 isset time: 0.06859207 speed difference: 22.49%
Output for 5.6.9
results for 1000000 iterations: suppressed time: 0.32803392 isset time: 0.07456207 speed difference: 22.73%
Output for 5.6.8
results for 1000000 iterations: suppressed time: 0.29279089 isset time: 0.06757712 speed difference: 23.08%
Output for 5.5.35
results for 1000000 iterations: suppressed time: 0.3164041 isset time: 0.07200503 speed difference: 22.76%
Output for 5.5.34
results for 1000000 iterations: suppressed time: 0.31524014 isset time: 0.07214403 speed difference: 22.89%
Output for 5.5.33
results for 1000000 iterations: suppressed time: 0.31717896 isset time: 0.07225704 speed difference: 22.78%
Output for 5.5.32
results for 1000000 iterations: suppressed time: 0.29695392 isset time: 0.06983185 speed difference: 23.52%
Output for 5.5.31
results for 1000000 iterations: suppressed time: 0.31321692 isset time: 0.072258 speed difference: 23.07%
Output for 5.5.30
results for 1000000 iterations: suppressed time: 0.31309104 isset time: 0.07305884 speed difference: 23.33%
Output for 5.5.29
results for 1000000 iterations: suppressed time: 0.34672189 isset time: 0.08589911 speed difference: 24.77%
Output for 5.5.28
results for 1000000 iterations: suppressed time: 0.31566596 isset time: 0.07319403 speed difference: 23.19%
Output for 5.5.27
results for 1000000 iterations: suppressed time: 0.32210088 isset time: 0.07315016 speed difference: 22.71%
Output for 5.5.26
results for 1000000 iterations: suppressed time: 0.3178401 isset time: 0.07219911 speed difference: 22.72%
Output for 5.5.25
results for 1000000 iterations: suppressed time: 0.32399106 isset time: 0.07181597 speed difference: 22.17%
Output for 5.5.24
results for 1000000 iterations: suppressed time: 0.32197595 isset time: 0.07199907 speed difference: 22.36%
Output for 5.4.45
results for 1000000 iterations: suppressed time: 0.29285598 isset time: 0.074301 speed difference: 25.37%
Output for 5.4.44
results for 1000000 iterations: suppressed time: 0.29608703 isset time: 0.07231879 speed difference: 24.42%
Output for 5.4.43
results for 1000000 iterations: suppressed time: 0.31809616 isset time: 0.07247901 speed difference: 22.79%
Output for 5.4.42
results for 1000000 iterations: suppressed time: 0.29079509 isset time: 0.073102 speed difference: 25.14%
Output for 5.4.41
results for 1000000 iterations: suppressed time: 0.30935001 isset time: 0.07165194 speed difference: 23.16%
Output for 5.4.40
results for 1000000 iterations: suppressed time: 0.29437995 isset time: 0.07156181 speed difference: 24.31%
Output for 5.4.39
results for 1000000 iterations: suppressed time: 0.29728913 isset time: 0.07178497 speed difference: 24.15%
Output for 5.4.38
results for 1000000 iterations: suppressed time: 0.31440687 isset time: 0.07265306 speed difference: 23.11%
Output for 5.4.37
results for 1000000 iterations: suppressed time: 0.29290295 isset time: 0.07186508 speed difference: 24.54%
Output for 5.4.36
results for 1000000 iterations: suppressed time: 0.3229661 isset time: 0.07195497 speed difference: 22.28%
Output for 5.4.35
results for 1000000 iterations: suppressed time: 0.28548908 isset time: 0.07121301 speed difference: 24.94%
Output for 5.4.34
results for 1000000 iterations: suppressed time: 0.28253984 isset time: 0.07281208 speed difference: 25.77%
Output for 5.4.32
results for 1000000 iterations: suppressed time: 0.29953098 isset time: 0.07038093 speed difference: 23.5%
Output for 5.4.31
results for 1000000 iterations: suppressed time: 0.29434323 isset time: 0.07307506 speed difference: 24.83%
Output for 5.4.30
results for 1000000 iterations: suppressed time: 0.31154394 isset time: 0.07311296 speed difference: 23.47%
Output for 5.4.29
results for 1000000 iterations: suppressed time: 0.31452608 isset time: 0.06980085 speed difference: 22.19%
Output for 5.4.28
results for 1000000 iterations: suppressed time: 0.29384494 isset time: 0.07432795 speed difference: 25.29%
Output for 5.4.27
results for 1000000 iterations: suppressed time: 0.30208206 isset time: 0.07110214 speed difference: 23.54%
Output for 5.4.26
results for 1000000 iterations: suppressed time: 0.30221796 isset time: 0.0734942 speed difference: 24.32%
Output for 5.4.25
results for 1000000 iterations: suppressed time: 0.31517482 isset time: 0.07260799 speed difference: 23.04%
Output for 5.4.24
results for 1000000 iterations: suppressed time: 0.29358816 isset time: 0.07220006 speed difference: 24.59%
Output for 5.4.23
results for 1000000 iterations: suppressed time: 0.30936003 isset time: 0.07415009 speed difference: 23.97%
Output for 5.4.22
results for 1000000 iterations: suppressed time: 0.31180286 isset time: 0.07294297 speed difference: 23.39%
Output for 5.4.21
results for 1000000 iterations: suppressed time: 0.29220295 isset time: 0.07284498 speed difference: 24.93%
Output for 5.4.20
results for 1000000 iterations: suppressed time: 0.29507709 isset time: 0.07257414 speed difference: 24.59%
Output for 5.4.19
results for 1000000 iterations: suppressed time: 0.42583799 isset time: 0.10951495 speed difference: 25.72%
Output for 5.4.18
results for 1000000 iterations: suppressed time: 0.29117203 isset time: 0.07337713 speed difference: 25.2%
Output for 5.4.17
results for 1000000 iterations: suppressed time: 0.3388629 isset time: 0.07414508 speed difference: 21.88%
Output for 5.4.16
results for 1000000 iterations: suppressed time: 0.44538093 isset time: 0.11510205 speed difference: 25.84%
Output for 5.4.15
results for 1000000 iterations: suppressed time: 0.31202388 isset time: 0.07335305 speed difference: 23.51%
Output for 5.4.14
results for 1000000 iterations: suppressed time: 0.29044795 isset time: 0.06996703 speed difference: 24.09%
Output for 5.4.13
results for 1000000 iterations: suppressed time: 0.2883451 isset time: 0.06883693 speed difference: 23.87%
Output for 5.4.12
results for 1000000 iterations: suppressed time: 0.28503489 isset time: 0.07001495 speed difference: 24.56%
Output for 5.4.11
results for 1000000 iterations: suppressed time: 0.3204062 isset time: 0.07250595 speed difference: 22.63%
Output for 5.4.10
results for 1000000 iterations: suppressed time: 0.33107591 isset time: 0.07369113 speed difference: 22.26%
Output for 5.4.9
results for 1000000 iterations: suppressed time: 0.30742598 isset time: 0.07342911 speed difference: 23.89%
Output for 5.4.8
results for 1000000 iterations: suppressed time: 0.32505703 isset time: 0.07312489 speed difference: 22.5%
Output for 5.4.7
results for 1000000 iterations: suppressed time: 0.32247615 isset time: 0.07385015 speed difference: 22.9%
Output for 5.4.6
results for 1000000 iterations: suppressed time: 0.32491803 isset time: 0.07372499 speed difference: 22.69%
Output for 5.4.5
results for 1000000 iterations: suppressed time: 0.40594196 isset time: 0.09639692 speed difference: 23.75%
Output for 5.4.4
results for 1000000 iterations: suppressed time: 0.31392288 isset time: 0.07475615 speed difference: 23.81%
Output for 5.4.3
results for 1000000 iterations: suppressed time: 0.31665897 isset time: 0.07207298 speed difference: 22.76%
Output for 5.4.2
results for 1000000 iterations: suppressed time: 0.33218813 isset time: 0.07155704 speed difference: 21.54%
Output for 5.4.1
results for 1000000 iterations: suppressed time: 0.30638218 isset time: 0.07269812 speed difference: 23.73%
Output for 5.4.0
results for 1000000 iterations: suppressed time: 0.43730283 isset time: 0.10078788 speed difference: 23.05%
Output for 5.3.29
results for 1000000 iterations: suppressed time: 0.42342687 isset time: 0.08818603 speed difference: 20.83%
Output for 5.3.28
results for 1000000 iterations: suppressed time: 0.43829489 isset time: 0.08975291 speed difference: 20.48%
Output for 5.3.27
results for 1000000 iterations: suppressed time: 0.44528913 isset time: 0.09356093 speed difference: 21.01%
Output for 5.3.26
results for 1000000 iterations: suppressed time: 0.42817307 isset time: 0.08886003 speed difference: 20.75%
Output for 5.3.25
results for 1000000 iterations: suppressed time: 0.43967915 isset time: 0.09577203 speed difference: 21.78%
Output for 5.3.24
results for 1000000 iterations: suppressed time: 0.43677115 isset time: 0.08943105 speed difference: 20.48%
Output for 5.3.23
results for 1000000 iterations: suppressed time: 0.42312002 isset time: 0.08796501 speed difference: 20.79%
Output for 5.3.22
results for 1000000 iterations: suppressed time: 0.40764284 isset time: 0.08826804 speed difference: 21.65%
Output for 5.3.21
results for 1000000 iterations: suppressed time: 0.43170881 isset time: 0.09149599 speed difference: 21.19%
Output for 5.3.20
results for 1000000 iterations: suppressed time: 0.44277096 isset time: 0.09590316 speed difference: 21.66%
Output for 5.3.19
results for 1000000 iterations: suppressed time: 0.45018315 isset time: 0.09094715 speed difference: 20.2%
Output for 5.3.18
results for 1000000 iterations: suppressed time: 0.437608 isset time: 0.09187007 speed difference: 20.99%
Output for 5.3.17
results for 1000000 iterations: suppressed time: 0.43464398 isset time: 0.08924389 speed difference: 20.53%
Output for 5.3.16
results for 1000000 iterations: suppressed time: 0.42300987 isset time: 0.09127688 speed difference: 21.58%
Output for 5.3.15
results for 1000000 iterations: suppressed time: 0.42816496 isset time: 0.09053516 speed difference: 21.14%
Output for 5.3.14
results for 1000000 iterations: suppressed time: 0.44646502 isset time: 0.09144211 speed difference: 20.48%
Output for 5.3.13
results for 1000000 iterations: suppressed time: 0.43508101 isset time: 0.092381 speed difference: 21.23%
Output for 5.3.12
results for 1000000 iterations: suppressed time: 0.44181895 isset time: 0.09149504 speed difference: 20.71%
Output for 5.3.11
results for 1000000 iterations: suppressed time: 0.4235611 isset time: 0.09035802 speed difference: 21.33%
Output for 5.3.10
results for 1000000 iterations: suppressed time: 0.43560815 isset time: 0.09043288 speed difference: 20.76%
Output for 5.3.9
results for 1000000 iterations: suppressed time: 0.42192888 isset time: 0.09271502 speed difference: 21.97%
Output for 5.3.8
results for 1000000 iterations: suppressed time: 0.42425704 isset time: 0.094491 speed difference: 22.27%
Output for 5.3.7
results for 1000000 iterations: suppressed time: 0.4280839 isset time: 0.08935905 speed difference: 20.87%
Output for 5.3.6
results for 1000000 iterations: suppressed time: 0.42319489 isset time: 0.09052992 speed difference: 21.39%
Output for 5.3.5
results for 1000000 iterations: suppressed time: 0.43758798 isset time: 0.09056211 speed difference: 20.7%
Output for 5.3.4
results for 1000000 iterations: suppressed time: 0.435642 isset time: 0.09162807 speed difference: 21.03%
Output for 5.3.3
results for 1000000 iterations: suppressed time: 0.40651298 isset time: 0.08697486 speed difference: 21.4%
Output for 5.3.2
results for 1000000 iterations: suppressed time: 0.42814207 isset time: 0.09137797 speed difference: 21.34%
Output for 5.3.1
results for 1000000 iterations: suppressed time: 0.56935501 isset time: 0.12119007 speed difference: 21.29%
Output for 5.3.0
results for 1000000 iterations: suppressed time: 0.42654395 isset time: 0.09296179 speed difference: 21.79%
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected ':' in /in/XtXa8 on line 9
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected ':' in /in/XtXa8 on line 9
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/XtXa8 on line 9
Process exited with code 255.