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 "suppressed time: {$suppressedTime}\n"; echo "isset time: {$issetTime}\n\n"; echo "speed difference: " . round(100 / $suppressedTime * $issetTime, 2) . "%";
based on tIROU
Output for 7.1.0
suppressed time: 0.23695707 isset time: 0.02596998 speed difference: 10.96%
Output for 7.0.14
suppressed time: 0.24151087 isset time: 0.03646088 speed difference: 15.1%
Output for 7.0.6
suppressed time: 0.20694613 isset time: 0.02652502 speed difference: 12.82%
Output for 7.0.5
suppressed time: 0.20232391 isset time: 0.026546 speed difference: 13.12%
Output for 7.0.4
suppressed time: 0.16974187 isset time: 0.02572799 speed difference: 15.16%
Output for 7.0.3
suppressed time: 0.21433401 isset time: 0.02698302 speed difference: 12.59%
Output for 7.0.2
suppressed time: 0.17907 isset time: 0.02725697 speed difference: 15.22%
Output for 7.0.1
suppressed time: 0.21372104 isset time: 0.0265379 speed difference: 12.42%
Output for 7.0.0
suppressed time: 0.2196629 isset time: 0.02660298 speed difference: 12.11%
Output for 5.6.28
suppressed time: 0.13589907 isset time: -0.05809689 speed difference: -42.75%
Output for 5.6.21
suppressed time: 0.29394913 isset time: 0.07151794 speed difference: 24.33%
Output for 5.6.20
suppressed time: 0.29067802 isset time: 0.065943 speed difference: 22.69%
Output for 5.6.19
suppressed time: 0.42360711 isset time: 0.09213305 speed difference: 21.75%
Output for 5.6.18
suppressed time: 0.29919386 isset time: 0.067662 speed difference: 22.61%
Output for 5.6.17
suppressed time: 0.28832412 isset time: 0.06624103 speed difference: 22.97%
Output for 5.6.16
suppressed time: 0.29254699 isset time: 0.06746721 speed difference: 23.06%
Output for 5.6.15
suppressed time: 0.30085897 isset time: 0.07501101 speed difference: 24.93%
Output for 5.6.14
suppressed time: 0.32166505 isset time: 0.06907511 speed difference: 21.47%
Output for 5.6.13
suppressed time: 0.30439115 isset time: 0.07296395 speed difference: 23.97%
Output for 5.6.12
suppressed time: 0.32577205 isset time: 0.07058191 speed difference: 21.67%
Output for 5.6.11
suppressed time: 0.33879519 isset time: 0.067487 speed difference: 19.92%
Output for 5.6.10
suppressed time: 0.36993289 isset time: 0.0706799 speed difference: 19.11%
Output for 5.6.9
suppressed time: 0.30579495 isset time: 0.06863594 speed difference: 22.45%
Output for 5.6.8
suppressed time: 0.31679606 isset time: 0.0766511 speed difference: 24.2%
Output for 5.5.35
suppressed time: 0.24844289 isset time: 0.05946803 speed difference: 23.94%
Output for 5.5.34
suppressed time: 0.31139684 isset time: 0.07214713 speed difference: 23.17%
Output for 5.5.33
suppressed time: 0.303298 isset time: 0.07451701 speed difference: 24.57%
Output for 5.5.32
suppressed time: 0.3057909 isset time: 0.07257414 speed difference: 23.73%
Output for 5.5.31
suppressed time: 0.30149508 isset time: 0.07193208 speed difference: 23.86%
Output for 5.5.30
suppressed time: 0.30971694 isset time: 0.07935095 speed difference: 25.62%
Output for 5.5.29
suppressed time: 0.30622005 isset time: 0.07288098 speed difference: 23.8%
Output for 5.5.28
suppressed time: 0.32298207 isset time: 0.07214618 speed difference: 22.34%
Output for 5.5.27
suppressed time: 0.31684303 isset time: 0.07235384 speed difference: 22.84%
Output for 5.5.26
suppressed time: 0.30607986 isset time: 0.07206607 speed difference: 23.54%
Output for 5.5.25
suppressed time: 0.3317461 isset time: 0.07392597 speed difference: 22.28%
Output for 5.5.24
suppressed time: 0.31447196 isset time: 0.07357001 speed difference: 23.39%
Output for 5.4.45
suppressed time: 0.57555318 isset time: 0.24240685 speed difference: 42.12%
Output for 5.4.44
suppressed time: 0.30211496 isset time: 0.07375312 speed difference: 24.41%
Output for 5.4.43
suppressed time: 1.54703689 isset time: 0.18083596 speed difference: 11.69%
Output for 5.4.42
suppressed time: 0.70154881 isset time: 0.30673385 speed difference: 43.72%
Output for 5.4.41
suppressed time: 1.28032494 isset time: 0.3869729 speed difference: 30.22%
Output for 5.4.40
suppressed time: 0.68245006 isset time: 0.13489509 speed difference: 19.77%
Output for 5.4.39
suppressed time: 0.33274698 isset time: 0.09592605 speed difference: 28.83%
Output for 5.4.38
suppressed time: 0.43194818 isset time: 0.115839 speed difference: 26.82%
Output for 5.4.37
suppressed time: 0.69152212 isset time: 0.1203382 speed difference: 17.4%
Output for 5.4.36
suppressed time: 0.46686387 isset time: 0.10896492 speed difference: 23.34%
Output for 5.4.35
suppressed time: 0.49814391 isset time: 0.10447502 speed difference: 20.97%
Output for 5.4.34
suppressed time: 0.4813199 isset time: 0.14478779 speed difference: 30.08%
Output for 5.4.32
suppressed time: 0.34359503 isset time: 0.07747507 speed difference: 22.55%
Output for 5.4.31
suppressed time: 0.38256598 isset time: 0.07702899 speed difference: 20.13%
Output for 5.4.30
suppressed time: 0.33040404 isset time: 0.08031487 speed difference: 24.31%
Output for 5.4.29
suppressed time: 0.34396815 isset time: 0.07794499 speed difference: 22.66%
Output for 5.4.28
suppressed time: 0.37536979 isset time: 0.07915187 speed difference: 21.09%
Output for 5.4.27
suppressed time: 0.34728789 isset time: 0.09557986 speed difference: 27.52%
Output for 5.4.26
suppressed time: 0.41183615 isset time: 0.09400988 speed difference: 22.83%
Output for 5.4.25
suppressed time: 0.32336092 isset time: 0.07996702 speed difference: 24.73%
Output for 5.4.24
suppressed time: 0.43435884 isset time: 0.1028111 speed difference: 23.67%
Output for 5.4.23
suppressed time: 0.44626689 isset time: 0.07870603 speed difference: 17.64%
Output for 5.4.22
suppressed time: 0.456671 isset time: 0.07985115 speed difference: 17.49%
Output for 5.4.21
suppressed time: 0.37631583 isset time: 0.10354996 speed difference: 27.52%
Output for 5.4.20
suppressed time: 0.37764311 isset time: 0.07988286 speed difference: 21.15%
Output for 5.4.19
suppressed time: 0.37841606 isset time: 0.109483 speed difference: 28.93%
Output for 5.4.18
suppressed time: 0.36037803 isset time: 0.10575008 speed difference: 29.34%
Output for 5.4.17
suppressed time: 0.36671686 isset time: 0.11323118 speed difference: 30.88%
Output for 5.4.16
suppressed time: 0.339288 isset time: 0.07847095 speed difference: 23.13%
Output for 5.4.15
suppressed time: 0.33218217 isset time: 0.07756186 speed difference: 23.35%
Output for 5.4.14
suppressed time: 0.42611003 isset time: 0.07864213 speed difference: 18.46%
Output for 5.4.13
suppressed time: 0.41187906 isset time: 0.08754587 speed difference: 21.26%
Output for 5.4.12
suppressed time: 0.33795404 isset time: 0.07850218 speed difference: 23.23%
Output for 5.4.11
suppressed time: 0.35346603 isset time: 0.08240294 speed difference: 23.31%
Output for 5.4.10
suppressed time: 0.37422013 isset time: 0.08389115 speed difference: 22.42%
Output for 5.4.9
suppressed time: 0.37944913 isset time: 0.08292103 speed difference: 21.85%
Output for 5.4.8
suppressed time: 0.35685802 isset time: 0.07996893 speed difference: 22.41%
Output for 5.4.7
suppressed time: 0.34553814 isset time: 0.08074903 speed difference: 23.37%
Output for 5.4.6
suppressed time: 0.34529209 isset time: 0.08304286 speed difference: 24.05%
Output for 5.4.5
suppressed time: 0.34867287 isset time: 0.08347917 speed difference: 23.94%
Output for 5.4.4
suppressed time: 0.41328406 isset time: 0.082623 speed difference: 19.99%
Output for 5.4.3
suppressed time: 0.35174108 isset time: 0.09143901 speed difference: 26%
Output for 5.4.2
suppressed time: 0.35279608 isset time: 0.0890739 speed difference: 25.25%
Output for 5.4.1
suppressed time: 0.36371398 isset time: 0.07839704 speed difference: 21.55%
Output for 5.4.0
suppressed time: 0.41091704 isset time: 0.0912149 speed difference: 22.2%
Output for 5.3.29
suppressed time: 0.47480011 isset time: 0.1032939 speed difference: 21.76%
Output for 5.3.28
suppressed time: 0.56431913 isset time: 0.09951496 speed difference: 17.63%
Output for 5.3.27
suppressed time: 0.56677914 isset time: 0.09998298 speed difference: 17.64%
Output for 5.3.26
suppressed time: 0.55306101 isset time: 0.10401011 speed difference: 18.81%
Output for 5.3.25
suppressed time: 0.48796916 isset time: 0.10011196 speed difference: 20.52%
Output for 5.3.24
suppressed time: 0.46706295 isset time: 0.12623191 speed difference: 27.03%
Output for 5.3.23
suppressed time: 0.49102211 isset time: 0.12035513 speed difference: 24.51%
Output for 5.3.22
suppressed time: 0.46045899 isset time: 0.10092282 speed difference: 21.92%
Output for 5.3.21
suppressed time: 0.47650599 isset time: 0.1029439 speed difference: 21.6%
Output for 5.3.20
suppressed time: 0.47067022 isset time: 0.11014819 speed difference: 23.4%
Output for 5.3.19
suppressed time: 0.45436001 isset time: 0.10001802 speed difference: 22.01%
Output for 5.3.18
suppressed time: 0.52500486 isset time: 0.1006 speed difference: 19.16%
Output for 5.3.17
suppressed time: 0.46571994 isset time: 0.12627602 speed difference: 27.11%
Output for 5.3.16
suppressed time: 0.48563099 isset time: 0.13650823 speed difference: 28.11%
Output for 5.3.15
suppressed time: 0.49445796 isset time: 0.10013509 speed difference: 20.25%
Output for 5.3.14
suppressed time: 0.48158407 isset time: 0.12124991 speed difference: 25.18%
Output for 5.3.13
suppressed time: 0.46511602 isset time: 0.10340309 speed difference: 22.23%
Output for 5.3.12
suppressed time: 0.510288 isset time: 0.10148001 speed difference: 19.89%
Output for 5.3.11
suppressed time: 0.45308805 isset time: 0.11922097 speed difference: 26.31%
Output for 5.3.10
suppressed time: 0.45000196 isset time: 0.1044879 speed difference: 23.22%
Output for 5.3.9
suppressed time: 0.46772003 isset time: 0.09915519 speed difference: 21.2%
Output for 5.3.8
suppressed time: 0.45923305 isset time: 0.1050601 speed difference: 22.88%
Output for 5.3.7
suppressed time: 0.56653905 isset time: 0.11459589 speed difference: 20.23%
Output for 5.3.6
suppressed time: 0.49904013 isset time: 0.10186887 speed difference: 20.41%
Output for 5.3.5
suppressed time: 0.51705599 isset time: 0.12059593 speed difference: 23.32%
Output for 5.3.4
suppressed time: 0.47244906 isset time: 0.13317513 speed difference: 28.19%
Output for 5.3.3
suppressed time: 0.48276186 isset time: 0.10353398 speed difference: 21.45%
Output for 5.3.2
suppressed time: 0.54038095 isset time: 0.09915805 speed difference: 18.35%
Output for 5.3.1
suppressed time: 0.466959 isset time: 0.09649706 speed difference: 20.66%
Output for 5.3.0
suppressed time: 0.47420001 isset time: 0.10305691 speed difference: 21.73%
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected ':' in /in/c6q3a 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/c6q3a on line 9
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/c6q3a on line 9
Process exited with code 255.