3v4l.org

run code in 300+ PHP versions simultaneously
<?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) . "%";

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.2.00.0070.34719.54
7.1.70.0000.22717.24
7.1.60.0030.28019.40
7.1.50.0070.25616.98
7.1.00.0000.34722.57
7.0.200.0000.28616.90
7.0.140.0000.46721.90
7.0.100.0070.29720.01
7.0.90.0100.28319.99
7.0.80.0430.29019.88
7.0.70.0130.33720.01
7.0.60.0070.31720.07
7.0.50.0030.33720.34
7.0.40.0030.30719.96
7.0.30.0070.31320.04
7.0.20.0130.32020.04
7.0.10.0100.31319.94
7.0.00.0100.31320.14
5.6.280.0030.49721.11
5.6.250.0100.45720.50
5.6.240.0100.46720.69
5.6.230.0070.45320.67
5.6.220.0070.46020.60
5.6.210.0070.47720.78
5.6.200.0200.45021.04
5.6.190.0030.47721.19
5.6.180.0070.46721.11
5.6.170.0100.46321.12
5.6.160.0070.45721.07
5.6.150.0130.53021.03
5.6.140.0000.46321.02
5.6.130.0130.48021.02
5.6.120.0070.47721.02
5.6.110.0000.44021.03
5.6.100.0100.52721.10
5.6.90.0000.47721.09
5.6.80.0030.48320.41
5.6.70.0070.46020.54
5.6.60.0130.43720.43
5.6.50.0070.39020.46
5.6.40.0030.47320.28
5.6.30.0030.37720.28
5.6.20.0030.41320.53
5.6.10.0030.41320.50
5.6.00.0130.34320.29
5.5.380.0100.47020.39
5.5.370.0030.45020.39
5.5.360.0070.46020.56
5.5.350.0030.54320.38
5.5.340.0200.54020.91
5.5.330.0070.46320.93
5.5.320.0130.45020.93
5.5.310.0100.47320.73
5.5.300.0170.46020.84
5.5.290.0200.46320.92
5.5.280.0000.50020.84
5.5.270.0030.45720.73
5.5.260.0100.50320.80
5.5.250.0170.46720.61
5.5.240.0030.47720.13
5.5.230.0000.46020.14
5.5.220.0070.46320.24
5.5.210.0030.42720.25
5.5.200.0030.45020.28
5.5.190.0070.33720.09
5.5.180.0130.43020.13
5.5.160.0000.41020.21
5.5.150.0070.47720.22
5.5.140.0100.40320.22
5.5.130.0070.46320.24
5.5.120.0070.45320.21
5.5.110.0100.47720.13
5.5.100.0030.46020.09
5.5.90.0030.46720.17
5.5.80.0030.45720.11
5.5.70.0100.46320.12
5.5.60.0030.49020.01
5.5.50.0100.46020.00
5.5.40.0130.47020.16
5.5.30.0100.46720.14
5.5.20.0070.46020.09
5.5.10.0130.49720.04
5.5.00.0030.47320.03
5.4.450.0030.48719.52
5.4.440.0070.44719.30
5.4.430.0230.45319.39
5.4.420.0130.45019.48
5.4.410.0130.46319.34
5.4.400.0170.44719.13
5.4.390.0130.45019.29
5.4.380.0100.46719.19
5.4.370.0430.34019.16
5.4.360.0070.46318.97
5.4.350.0000.42719.16
5.4.340.0030.43019.03
5.4.320.0030.42318.98
5.4.310.0200.45019.29
5.4.300.0100.45318.95
5.4.290.0030.46719.19
5.4.280.0030.48719.09
5.4.270.0000.48719.12
5.4.260.0070.54019.25
5.4.250.0030.48019.11
5.4.240.0070.47019.28
5.4.230.0000.45319.27
5.4.220.0100.45319.06
5.4.210.0100.47719.11
5.4.200.0070.47318.96
5.4.190.0030.42718.96
5.4.180.0100.47319.18
5.4.170.0070.49019.02
5.4.160.0030.47719.01
5.4.150.0100.48319.05
5.4.140.0070.47716.26
5.4.130.0100.48016.36
5.4.120.0170.46716.38
5.4.110.0000.53016.21
5.4.100.0000.47716.21
5.4.90.0030.55016.41
5.4.80.0170.47716.31
5.4.70.0030.47716.43
5.4.60.0030.45016.38
5.4.50.0070.47316.43
5.4.40.0070.46716.31
5.4.30.0130.46016.38
5.4.20.0170.45016.25
5.4.10.0070.46016.23
5.4.00.0070.46315.75
5.3.290.0070.61314.73
5.3.280.0030.62014.49
5.3.270.0000.60314.59
5.3.260.0030.65714.67
5.3.250.0100.65014.63
5.3.240.0070.63714.68
5.3.230.0070.61314.53
5.3.220.0100.62714.63
5.3.210.0070.60014.55
5.3.200.0070.61714.47
5.3.190.0030.61014.59
5.3.180.0070.60314.55
5.3.170.0100.59314.63
5.3.160.0030.61014.51
5.3.150.0070.64714.55
5.3.140.0070.61314.54
5.3.130.0070.59014.51
5.3.120.0070.61014.61
5.3.110.0000.61014.45
5.3.100.0100.61713.97
5.3.90.0070.60714.01
5.3.80.0100.60714.03
5.3.70.0100.64013.99
5.3.60.0030.62013.88
5.3.50.0130.58713.71
5.3.40.0100.62713.74
5.3.30.0070.60313.93
5.3.20.0030.55313.56
5.3.10.0070.62013.67
5.3.00.0070.63013.61
5.2.170.0070.06310.94
5.2.160.0130.05311.14
5.2.150.0030.06711.11
5.2.140.0070.05711.14
5.2.130.0100.05711.11
5.2.120.0070.06011.05
5.2.110.0030.05711.13
5.2.100.0000.06311.09
5.2.90.0000.06311.16
5.2.80.0100.06011.02
5.2.70.0030.06310.94
5.2.60.0170.05010.93
5.2.50.0100.05010.81
5.2.40.0130.03310.96
5.2.30.0100.05710.94
5.2.20.0030.06311.00
5.2.10.0130.05010.91
5.2.00.0130.05010.59
5.1.60.0130.04310.03
5.1.50.0070.05310.02
5.1.40.0070.05310.06
5.1.30.0100.05310.40
5.1.20.0130.05010.39
5.1.10.0070.0539.95
5.1.00.0130.0479.95
5.0.50.0070.0478.56
5.0.40.0070.0408.39
5.0.30.0030.0638.18
5.0.20.0100.0378.30
5.0.10.0030.0378.18
5.0.00.0030.0508.18
4.4.90.0030.0338.18
4.4.80.0030.0378.18
4.4.70.0030.0378.18
4.4.60.0000.0378.18
4.4.50.0170.0238.18
4.4.40.0030.0538.18
4.4.30.0070.0308.18
4.4.20.0000.0378.18
4.4.10.0000.0378.18
4.4.00.0030.0538.18
4.3.110.0030.0308.18
4.3.100.0000.0338.18
4.3.90.0000.0338.18
4.3.80.0000.0278.18
4.3.70.0000.0208.18
4.3.60.0000.0238.18
4.3.50.0000.0178.18
4.3.40.0070.0408.18
4.3.30.0030.0238.18
4.3.20.0000.0278.18
4.3.10.0030.0138.18
4.3.00.0000.0178.18

preferences:
34.93 ms | 401 KiB | 5 Q