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"; echo "speed difference: " . round(100 / $suppressedTime * $issetTime, 2) . "%";
based on XtXa8
Output for 7.1.0
results for 1000000 iterations: suppressed time: 0.24199986 isset time: 0.02588892 speed difference: 10.7%
Output for 7.0.14
results for 1000000 iterations: suppressed time: 0.10208392 isset time: -0.04327989 speed difference: -42.4%
Output for 7.0.10
results for 1000000 iterations: suppressed time: 0.19591689 isset time: 0.02643108 speed difference: 13.49%
Output for 7.0.9
results for 1000000 iterations: suppressed time: 0.1858902 isset time: 0.02646184 speed difference: 14.24%
Output for 7.0.8
results for 1000000 iterations: suppressed time: 0.18280101 isset time: 0.02662802 speed difference: 14.57%
Output for 7.0.7
results for 1000000 iterations: suppressed time: 0.23585701 isset time: 0.03309298 speed difference: 14.03%
Output for 7.0.6
results for 1000000 iterations: suppressed time: 0.21567297 isset time: 0.02756405 speed difference: 12.78%
Output for 7.0.5
results for 1000000 iterations: suppressed time: 0.21841812 isset time: 0.02650094 speed difference: 12.13%
Output for 7.0.4
results for 1000000 iterations: suppressed time: 0.19312906 isset time: 0.02738214 speed difference: 14.18%
Output for 7.0.3
results for 1000000 iterations: suppressed time: 0.20046306 isset time: 0.02905107 speed difference: 14.49%
Output for 7.0.2
results for 1000000 iterations: suppressed time: 0.21337199 isset time: 0.02662683 speed difference: 12.48%
Output for 7.0.1
results for 1000000 iterations: suppressed time: 0.20492697 isset time: 0.02730203 speed difference: 13.32%
Output for 7.0.0
results for 1000000 iterations: suppressed time: 0.20135784 isset time: 0.02676296 speed difference: 13.29%
Output for hhvm-3.12.0
results for 1000000 iterations: suppressed time: 0.16310406 isset time: 0.11242914 speed difference: 68.93%
Output for hhvm-3.10.0
results for 1000000 iterations: suppressed time: 0.40418696 isset time: 0.14921498 speed difference: 36.92%
Output for 5.6.28
results for 1000000 iterations: suppressed time: -0.31104612 isset time: -0.05766201 speed difference: 18.54%
Output for 5.6.25
results for 1000000 iterations: suppressed time: 0.30880094 isset time: 0.06727695 speed difference: 21.79%
Output for 5.6.24
results for 1000000 iterations: suppressed time: 0.30387902 isset time: 0.08753705 speed difference: 28.81%
Output for 5.6.23
results for 1000000 iterations: suppressed time: 0.29955101 isset time: 0.06599212 speed difference: 22.03%
Output for 5.6.22
results for 1000000 iterations: suppressed time: 0.31865501 isset time: 0.06651902 speed difference: 20.87%
Output for 5.6.21
results for 1000000 iterations: suppressed time: 0.32569289 isset time: 0.06687117 speed difference: 20.53%
Output for 5.6.20
results for 1000000 iterations: suppressed time: 0.30988598 isset time: 0.06790614 speed difference: 21.91%
Output for 5.6.19
results for 1000000 iterations: suppressed time: 0.32227707 isset time: 0.06696987 speed difference: 20.78%
Output for 5.6.18
results for 1000000 iterations: suppressed time: 0.32002306 isset time: 0.06845999 speed difference: 21.39%
Output for 5.6.17
results for 1000000 iterations: suppressed time: 0.32284403 isset time: 0.06694293 speed difference: 20.74%
Output for 5.6.16
results for 1000000 iterations: suppressed time: 0.30373478 isset time: 0.06985617 speed difference: 23%
Output for 5.6.15
results for 1000000 iterations: suppressed time: 0.39234805 isset time: 0.08648682 speed difference: 22.04%
Output for 5.6.14
results for 1000000 iterations: suppressed time: 0.30530286 isset time: 0.06939411 speed difference: 22.73%
Output for 5.6.13
results for 1000000 iterations: suppressed time: 0.32909107 isset time: 0.06748796 speed difference: 20.51%
Output for 5.6.12
results for 1000000 iterations: suppressed time: 0.32494688 isset time: 0.0674901 speed difference: 20.77%
Output for 5.6.11
results for 1000000 iterations: suppressed time: 0.30317116 isset time: 0.06771088 speed difference: 22.33%
Output for 5.6.10
results for 1000000 iterations: suppressed time: 0.38008404 isset time: 0.08674002 speed difference: 22.82%
Output for 5.6.9
results for 1000000 iterations: suppressed time: 0.32130504 isset time: 0.067765 speed difference: 21.09%
Output for 5.6.8
results for 1000000 iterations: suppressed time: 0.32830095 isset time: 0.07102108 speed difference: 21.63%
Output for 5.6.7
results for 1000000 iterations: suppressed time: 0.30915093 isset time: 0.06956911 speed difference: 22.5%
Output for 5.6.6
results for 1000000 iterations: suppressed time: 0.30312681 isset time: 0.06773496 speed difference: 22.35%
Output for 5.6.5
results for 1000000 iterations: suppressed time: 0.285712 isset time: 0.0659709 speed difference: 23.09%
Output for 5.6.4
results for 1000000 iterations: suppressed time: 0.32118082 isset time: 0.06892395 speed difference: 21.46%
Output for 5.6.3
results for 1000000 iterations: suppressed time: 0.27583718 isset time: 0.06076789 speed difference: 22.03%
Output for 5.6.2
results for 1000000 iterations: suppressed time: 0.30379081 isset time: 0.07164693 speed difference: 23.58%
Output for 5.6.1
results for 1000000 iterations: suppressed time: 0.30176091 isset time: 0.07299805 speed difference: 24.19%
Output for 5.6.0
results for 1000000 iterations: suppressed time: 0.25823116 isset time: 0.05594897 speed difference: 21.67%
Output for 5.5.38
results for 1000000 iterations: suppressed time: 0.32710695 isset time: 0.07165098 speed difference: 21.9%
Output for 5.5.37
results for 1000000 iterations: suppressed time: 0.30459094 isset time: 0.07157278 speed difference: 23.5%
Output for 5.5.36
results for 1000000 iterations: suppressed time: 0.3102169 isset time: 0.07231903 speed difference: 23.31%
Output for 5.5.35
results for 1000000 iterations: suppressed time: 0.38667107 isset time: 0.09225416 speed difference: 23.86%
Output for 5.5.34
results for 1000000 iterations: suppressed time: 0.40019512 isset time: 0.09057808 speed difference: 22.63%
Output for 5.5.33
results for 1000000 iterations: suppressed time: 0.30707097 isset time: 0.07269907 speed difference: 23.68%
Output for 5.5.32
results for 1000000 iterations: suppressed time: 0.31715989 isset time: 0.07184815 speed difference: 22.65%
Output for 5.5.31
results for 1000000 iterations: suppressed time: 0.31816006 isset time: 0.0826149 speed difference: 25.97%
Output for 5.5.30
results for 1000000 iterations: suppressed time: 0.31729007 isset time: 0.0738461 speed difference: 23.27%
Output for 5.5.29
results for 1000000 iterations: suppressed time: 0.31750202 isset time: 0.07291698 speed difference: 22.97%
Output for 5.5.28
results for 1000000 iterations: suppressed time: 0.33396912 isset time: 0.07197309 speed difference: 21.55%
Output for 5.5.27
results for 1000000 iterations: suppressed time: 0.30374908 isset time: 0.07411218 speed difference: 24.4%
Output for 5.5.26
results for 1000000 iterations: suppressed time: 0.34918094 isset time: 0.0734539 speed difference: 21.04%
Output for 5.5.25
results for 1000000 iterations: suppressed time: 0.32080793 isset time: 0.07216597 speed difference: 22.5%
Output for 5.5.24
results for 1000000 iterations: suppressed time: 0.30291486 isset time: 0.09271502 speed difference: 30.61%
Output for 5.5.23
results for 1000000 iterations: suppressed time: 0.30854797 isset time: 0.07454395 speed difference: 24.16%
Output for 5.5.22
results for 1000000 iterations: suppressed time: 0.32237506 isset time: 0.07206392 speed difference: 22.35%
Output for 5.5.21
results for 1000000 iterations: suppressed time: 0.3015821 isset time: 0.07349086 speed difference: 24.37%
Output for 5.5.20
results for 1000000 iterations: suppressed time: 0.30698085 isset time: 0.07198691 speed difference: 23.45%
Output for 5.5.19
results for 1000000 iterations: suppressed time: 0.24475193 isset time: 0.05940294 speed difference: 24.27%
Output for 5.5.18
results for 1000000 iterations: suppressed time: 0.30703807 isset time: 0.07253695 speed difference: 23.62%
Output for 5.5.16
results for 1000000 iterations: suppressed time: 0.29608417 isset time: 0.07284403 speed difference: 24.6%
Output for 5.5.15
results for 1000000 iterations: suppressed time: 0.32913613 isset time: 0.07305884 speed difference: 22.2%
Output for 5.5.14
results for 1000000 iterations: suppressed time: 0.29618502 isset time: 0.07230997 speed difference: 24.41%
Output for 5.5.13
results for 1000000 iterations: suppressed time: 0.30992103 isset time: 0.0737772 speed difference: 23.81%
Output for 5.5.12
results for 1000000 iterations: suppressed time: 0.31083393 isset time: 0.07325792 speed difference: 23.57%
Output for 5.5.11
results for 1000000 iterations: suppressed time: 0.328372 isset time: 0.07342815 speed difference: 22.36%
Output for 5.5.10
results for 1000000 iterations: suppressed time: 0.30772591 isset time: 0.07361507 speed difference: 23.92%
Output for 5.5.9
results for 1000000 iterations: suppressed time: 0.31417418 isset time: 0.07209706 speed difference: 22.95%
Output for 5.5.8
results for 1000000 iterations: suppressed time: 0.3062849 isset time: 0.072227 speed difference: 23.58%
Output for 5.5.7
results for 1000000 iterations: suppressed time: 0.32071805 isset time: 0.07175994 speed difference: 22.37%
Output for 5.5.6
results for 1000000 iterations: suppressed time: 0.34025121 isset time: 0.07201886 speed difference: 21.17%
Output for 5.5.5
results for 1000000 iterations: suppressed time: 0.31580615 isset time: 0.07256103 speed difference: 22.98%
Output for 5.5.4
results for 1000000 iterations: suppressed time: 0.32474089 isset time: 0.07284999 speed difference: 22.43%
Output for 5.5.3
results for 1000000 iterations: suppressed time: 0.32048702 isset time: 0.07225704 speed difference: 22.55%
Output for 5.5.2
results for 1000000 iterations: suppressed time: 0.30959797 isset time: 0.07235003 speed difference: 23.37%
Output for 5.5.1
results for 1000000 iterations: suppressed time: 0.38199186 isset time: 0.07490492 speed difference: 19.61%
Output for 5.5.0
results for 1000000 iterations: suppressed time: 0.32365108 isset time: 0.07232189 speed difference: 22.35%
Output for 5.4.45
results for 1000000 iterations: suppressed time: 0.32740808 isset time: 0.07504201 speed difference: 22.92%
Output for 5.4.44
results for 1000000 iterations: suppressed time: 0.306391 isset time: 0.07285905 speed difference: 23.78%
Output for 5.4.43
results for 1000000 iterations: suppressed time: 0.32230783 isset time: 0.07163692 speed difference: 22.23%
Output for 5.4.42
results for 1000000 iterations: suppressed time: 0.30407095 isset time: 0.07435703 speed difference: 24.45%
Output for 5.4.41
results for 1000000 iterations: suppressed time: 0.31793094 isset time: 0.07214785 speed difference: 22.69%
Output for 5.4.40
results for 1000000 iterations: suppressed time: 0.30841017 isset time: 0.07169986 speed difference: 23.25%
Output for 5.4.39
results for 1000000 iterations: suppressed time: 0.30759287 isset time: 0.07623696 speed difference: 24.79%
Output for 5.4.38
results for 1000000 iterations: suppressed time: 0.31762409 isset time: 0.07514691 speed difference: 23.66%
Output for 5.4.37
results for 1000000 iterations: suppressed time: 0.27150798 isset time: 0.0723331 speed difference: 26.64%
Output for 5.4.36
results for 1000000 iterations: suppressed time: 0.31711102 isset time: 0.07174706 speed difference: 22.63%
Output for 5.4.35
results for 1000000 iterations: suppressed time: 0.30183983 isset time: 0.07256603 speed difference: 24.04%
Output for 5.4.34
results for 1000000 iterations: suppressed time: 0.29585791 isset time: 0.06123996 speed difference: 20.7%
Output for 5.4.32
results for 1000000 iterations: suppressed time: 0.29921484 isset time: 0.07585502 speed difference: 25.35%
Output for 5.4.31
results for 1000000 iterations: suppressed time: 0.31357813 isset time: 0.07369804 speed difference: 23.5%
Output for 5.4.30
results for 1000000 iterations: suppressed time: 0.30798101 isset time: 0.07234001 speed difference: 23.49%
Output for 5.4.29
results for 1000000 iterations: suppressed time: 0.31414986 isset time: 0.07297397 speed difference: 23.23%
Output for 5.4.28
results for 1000000 iterations: suppressed time: 0.32896304 isset time: 0.07204604 speed difference: 21.9%
Output for 5.4.27
results for 1000000 iterations: suppressed time: 0.335217 isset time: 0.07250905 speed difference: 21.63%
Output for 5.4.26
results for 1000000 iterations: suppressed time: 0.39790392 isset time: 0.09248495 speed difference: 23.24%
Output for 5.4.25
results for 1000000 iterations: suppressed time: 0.32860899 isset time: 0.07359791 speed difference: 22.4%
Output for 5.4.24
results for 1000000 iterations: suppressed time: 0.32040906 isset time: 0.07208705 speed difference: 22.5%
Output for 5.4.23
results for 1000000 iterations: suppressed time: 0.31393003 isset time: 0.07367897 speed difference: 23.47%
Output for 5.4.22
results for 1000000 iterations: suppressed time: 0.3086369 isset time: 0.0747571 speed difference: 24.22%
Output for 5.4.21
results for 1000000 iterations: suppressed time: 0.33053994 isset time: 0.07430696 speed difference: 22.48%
Output for 5.4.20
results for 1000000 iterations: suppressed time: 0.31950808 isset time: 0.072577 speed difference: 22.72%
Output for 5.4.19
results for 1000000 iterations: suppressed time: 0.29935503 isset time: 0.07387686 speed difference: 24.68%
Output for 5.4.18
results for 1000000 iterations: suppressed time: 0.32944894 isset time: 0.07259798 speed difference: 22.04%
Output for 5.4.17
results for 1000000 iterations: suppressed time: 0.3393321 isset time: 0.07289481 speed difference: 21.48%
Output for 5.4.16
results for 1000000 iterations: suppressed time: 0.31157398 isset time: 0.09342289 speed difference: 29.98%
Output for 5.4.15
results for 1000000 iterations: suppressed time: 0.33411813 isset time: 0.07257104 speed difference: 21.72%
Output for 5.4.14
results for 1000000 iterations: suppressed time: 0.330616 isset time: 0.0716989 speed difference: 21.69%
Output for 5.4.13
results for 1000000 iterations: suppressed time: 0.33649492 isset time: 0.07157493 speed difference: 21.27%
Output for 5.4.12
results for 1000000 iterations: suppressed time: 0.35898399 isset time: 0.07220006 speed difference: 20.11%
Output for 5.4.11
results for 1000000 iterations: suppressed time: 0.37458992 isset time: 0.09099007 speed difference: 24.29%
Output for 5.4.10
results for 1000000 iterations: suppressed time: 0.3224349 isset time: 0.07244301 speed difference: 22.47%
Output for 5.4.9
results for 1000000 iterations: suppressed time: 0.39791894 isset time: 0.07339692 speed difference: 18.45%
Output for 5.4.8
results for 1000000 iterations: suppressed time: 0.34067607 isset time: 0.07195711 speed difference: 21.12%
Output for 5.4.7
results for 1000000 iterations: suppressed time: 0.32951188 isset time: 0.07233691 speed difference: 21.95%
Output for 5.4.6
results for 1000000 iterations: suppressed time: 0.30489707 isset time: 0.07377601 speed difference: 24.2%
Output for 5.4.5
results for 1000000 iterations: suppressed time: 0.32933784 isset time: 0.07207298 speed difference: 21.88%
Output for 5.4.4
results for 1000000 iterations: suppressed time: 0.31596088 isset time: 0.07440686 speed difference: 23.55%
Output for 5.4.3
results for 1000000 iterations: suppressed time: 0.3199141 isset time: 0.0719769 speed difference: 22.5%
Output for 5.4.2
results for 1000000 iterations: suppressed time: 0.3164959 isset time: 0.07345319 speed difference: 23.21%
Output for 5.4.1
results for 1000000 iterations: suppressed time: 0.31067109 isset time: 0.076267 speed difference: 24.55%
Output for 5.4.0
results for 1000000 iterations: suppressed time: 0.31771994 isset time: 0.07269192 speed difference: 22.88%
Output for 5.3.29
results for 1000000 iterations: suppressed time: 0.45490098 isset time: 0.08786702 speed difference: 19.32%
Output for 5.3.28
results for 1000000 iterations: suppressed time: 0.47009492 isset time: 0.08901405 speed difference: 18.94%
Output for 5.3.27
results for 1000000 iterations: suppressed time: 0.43405414 isset time: 0.08846116 speed difference: 20.38%
Output for 5.3.26
results for 1000000 iterations: suppressed time: 0.48587489 isset time: 0.08844495 speed difference: 18.2%
Output for 5.3.25
results for 1000000 iterations: suppressed time: 0.48595095 isset time: 0.08812881 speed difference: 18.14%
Output for 5.3.24
results for 1000000 iterations: suppressed time: 0.47173405 isset time: 0.08865595 speed difference: 18.79%
Output for 5.3.23
results for 1000000 iterations: suppressed time: 0.45096517 isset time: 0.08817101 speed difference: 19.55%
Output for 5.3.22
results for 1000000 iterations: suppressed time: 0.46466804 isset time: 0.08944297 speed difference: 19.25%
Output for 5.3.21
results for 1000000 iterations: suppressed time: 0.4354558 isset time: 0.09286118 speed difference: 21.33%
Output for 5.3.20
results for 1000000 iterations: suppressed time: 0.45166492 isset time: 0.09045506 speed difference: 20.03%
Output for 5.3.19
results for 1000000 iterations: suppressed time: 0.44211817 isset time: 0.08869791 speed difference: 20.06%
Output for 5.3.18
results for 1000000 iterations: suppressed time: 0.44158792 isset time: 0.09636593 speed difference: 21.82%
Output for 5.3.17
results for 1000000 iterations: suppressed time: 0.43396807 isset time: 0.09027195 speed difference: 20.8%
Output for 5.3.16
results for 1000000 iterations: suppressed time: 0.43760586 isset time: 0.09123397 speed difference: 20.85%
Output for 5.3.15
results for 1000000 iterations: suppressed time: 0.47895098 isset time: 0.0967288 speed difference: 20.2%
Output for 5.3.14
results for 1000000 iterations: suppressed time: 0.4412241 isset time: 0.09266186 speed difference: 21%
Output for 5.3.13
results for 1000000 iterations: suppressed time: 0.42628503 isset time: 0.09225607 speed difference: 21.64%
Output for 5.3.12
results for 1000000 iterations: suppressed time: 0.43974495 isset time: 0.09526896 speed difference: 21.66%
Output for 5.3.11
results for 1000000 iterations: suppressed time: 0.43153 isset time: 0.09548187 speed difference: 22.13%
Output for 5.3.10
results for 1000000 iterations: suppressed time: 0.45248508 isset time: 0.09254193 speed difference: 20.45%
Output for 5.3.9
results for 1000000 iterations: suppressed time: 0.43718791 isset time: 0.09302497 speed difference: 21.28%
Output for 5.3.8
results for 1000000 iterations: suppressed time: 0.44464588 isset time: 0.09091711 speed difference: 20.45%
Output for 5.3.7
results for 1000000 iterations: suppressed time: 0.478863 isset time: 0.08935714 speed difference: 18.66%
Output for 5.3.6
results for 1000000 iterations: suppressed time: 0.45492601 isset time: 0.08863997 speed difference: 19.48%
Output for 5.3.5
results for 1000000 iterations: suppressed time: 0.43304515 isset time: 0.09001899 speed difference: 20.79%
Output for 5.3.4
results for 1000000 iterations: suppressed time: 0.46786594 isset time: 0.09064293 speed difference: 19.37%
Output for 5.3.3
results for 1000000 iterations: suppressed time: 0.44320703 isset time: 0.08878589 speed difference: 20.03%
Output for 5.3.2
results for 1000000 iterations: suppressed time: 0.42344403 isset time: 0.08903003 speed difference: 21.03%
Output for 5.3.1
results for 1000000 iterations: suppressed time: 0.45629001 isset time: 0.08979392 speed difference: 19.68%
Output for 5.3.0
results for 1000000 iterations: suppressed time: 0.46301794 isset time: 0.09003901 speed difference: 19.45%
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected ':' in /in/3dt9g 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/3dt9g on line 9
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/3dt9g on line 9
Process exited with code 255.