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($suppressedTime / 100 * $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.3.10.0000.35216.37
7.3.00.0070.32816.85
7.2.130.0100.32516.99
7.2.120.0000.34316.91
7.2.110.0130.32616.86
7.2.100.0030.33216.96
7.2.90.0100.31016.80
7.2.80.0130.32516.77
7.2.70.0000.34217.13
7.2.60.0070.31317.09
7.2.50.0170.29616.92
7.2.40.0030.32616.72
7.2.30.0030.32816.80
7.2.20.0100.31017.08
7.2.10.0100.31716.93
7.2.00.0050.30517.92
7.1.250.0030.46015.84
7.1.70.0070.21117.19
7.1.60.0070.25519.40
7.1.50.0070.26416.96
7.1.00.0070.38322.36
7.0.200.0000.32416.87
7.0.140.0070.44322.18
7.0.120.0030.31021.98
7.0.110.0030.27321.96
7.0.100.0030.28322.07
7.0.90.0000.29022.11
7.0.80.0070.29322.07
7.0.70.0070.30322.06
7.0.60.0070.31021.92
7.0.50.0030.31022.13
7.0.40.0000.28020.13
7.0.30.0130.31719.96
7.0.20.0000.26020.02
7.0.10.0030.31020.09
7.0.00.0100.33019.96
5.6.280.0030.68321.16
5.6.270.0030.43321.07
5.6.260.0030.41720.92
5.6.250.0030.44320.91
5.6.240.0130.48320.82
5.6.230.0000.42720.87
5.6.220.0100.44720.73
5.6.210.0030.44020.89
5.6.200.0100.45320.78
5.6.190.0000.47721.01
5.6.180.0070.43720.96
5.6.170.0100.45720.78
5.6.160.0070.38720.69
5.6.150.0030.47021.00
5.6.140.0070.50720.71
5.6.130.0100.45320.84
5.6.120.0070.47320.79
5.6.110.0030.41720.96
5.6.100.0000.47020.87
5.6.90.0170.44020.76
5.6.80.0000.38720.25
5.6.70.0070.48320.35
5.6.60.0130.38720.24
5.6.50.0000.39320.41
5.6.40.0030.32720.06
5.6.30.0070.39720.23
5.6.20.0070.35020.27
5.6.10.0070.39320.30
5.6.00.0100.41020.04
5.5.380.0000.42317.53
5.5.370.0070.44717.47
5.5.360.0130.47317.35
5.5.350.0000.46317.53
5.5.340.0000.44017.76
5.5.330.0030.45017.84
5.5.320.0030.46018.19
5.5.310.0070.41318.12
5.5.300.0030.41018.13
5.5.290.0030.49717.98
5.5.280.0030.49018.10
5.5.270.0070.44717.84
5.5.260.0100.39718.01
5.5.250.0030.40717.94
5.5.240.0100.49717.39
5.5.230.0070.48317.50
5.5.220.0070.45717.50
5.5.210.0000.36017.63
5.5.200.0030.39717.52
5.5.190.0070.41017.52
5.5.180.0030.39317.45
5.5.160.0030.41017.21
5.5.150.0130.45317.11
5.5.140.0030.45017.47
5.5.130.0030.46717.24
5.5.120.0000.46317.20
5.5.110.0000.48717.51
5.5.100.0070.44317.38
5.5.90.0030.48317.10
5.5.80.0030.48317.09
5.5.70.0030.49017.41
5.5.60.0030.45317.36
5.5.50.0070.43317.42
5.5.40.0000.46017.00
5.5.30.0100.50317.13
5.5.20.0000.48717.23
5.5.10.0000.46317.09
5.5.00.0100.50317.10
5.4.450.0030.47719.38
5.4.440.0000.46719.38
5.4.430.0070.46719.34
5.4.420.0030.43719.43
5.4.410.0000.34319.30
5.4.400.0030.47019.00
5.4.390.0070.47719.02
5.4.380.0000.37018.93
5.4.370.0000.37019.13
5.4.360.0000.36019.05
5.4.350.0100.39719.07
5.4.340.0200.40319.07
5.4.320.0100.49718.95
5.4.310.0030.41319.12
5.4.300.0470.34719.21
5.4.290.0070.37019.11
5.4.280.0000.46018.89
5.4.270.0000.50019.05
5.4.260.0100.46319.10
5.4.250.0030.47018.84
5.4.240.0100.47018.93
5.4.230.0000.55018.98
5.4.220.0030.47719.18
5.4.210.0030.40719.11
5.4.200.0000.47319.00
5.4.190.0100.46719.04
5.4.180.0070.49318.98
5.4.170.0000.51318.94
5.4.160.0000.48719.05
5.4.150.0070.50018.99
5.4.140.0030.45016.50
5.4.130.0070.36716.49
5.4.120.0000.42016.51
5.4.110.0030.46716.29
5.4.100.0030.48716.23
5.4.90.0070.48016.34
5.4.80.0100.47016.37
5.4.70.0000.43016.41
5.4.60.0070.40016.32
5.4.50.0030.46316.26
5.4.40.0100.46016.46
5.4.30.0000.41716.34
5.4.20.0070.36316.21
5.4.10.0070.45716.11
5.4.00.0030.47015.89
5.3.290.0070.52314.78
5.3.280.0000.57714.57
5.3.270.0030.59314.50
5.3.260.0000.59014.71
5.3.250.0030.65314.74
5.3.240.0000.58314.63
5.3.230.0030.61714.45
5.3.220.0000.63314.68
5.3.210.0030.48314.70
5.3.200.0030.65714.58
5.3.190.0000.49014.57
5.3.180.0000.66014.57
5.3.170.0030.57714.56
5.3.160.0030.61314.46
5.3.150.0000.57314.65
5.3.140.0030.53014.41
5.3.130.0030.57714.69
5.3.120.0700.49014.69
5.3.110.0070.58714.55
5.3.100.0000.52013.88
5.3.90.0000.51314.13
5.3.80.0070.49014.04
5.3.70.0030.63713.99
5.3.60.0030.59013.86
5.3.50.0070.60313.82
5.3.40.0070.60313.84
5.3.30.0070.62013.85
5.3.20.0170.59313.49
5.3.10.0030.58013.73
5.3.00.0070.57013.51
5.2.170.0070.05311.09
5.2.160.0070.05711.30
5.2.150.0100.05711.30
5.2.140.0070.06311.08
5.2.130.0130.05011.04
5.2.120.0030.05311.05
5.2.110.0070.02011.03
5.2.100.0070.06010.89
5.2.90.0030.06011.02
5.2.80.0100.06010.99
5.2.70.0100.02711.04
5.2.60.0030.05711.21
5.2.50.0030.03011.18
5.2.40.0000.03310.90
5.2.30.0030.05010.86
5.2.20.0000.04710.98
5.2.10.0000.03310.98
5.2.00.0030.05310.85
5.1.60.0000.04010.15
5.1.50.0000.03310.15
5.1.40.0030.02310.15
5.1.30.0000.02710.27
5.1.20.0000.02710.28
5.1.10.0000.04310.15
5.1.00.0100.03010.32
5.0.50.0000.02310.15
5.0.40.0030.01710.15
5.0.30.0070.02310.15
5.0.20.0000.02010.15
5.0.10.0030.03010.15
5.0.00.0000.03010.15
4.4.90.0070.01710.15
4.4.80.0000.01310.15
4.4.70.0030.03310.15
4.4.60.0100.02310.15
4.4.50.0000.01310.15
4.4.40.0000.02310.15
4.4.30.0000.01710.15
4.4.20.0000.03010.15
4.4.10.0000.01710.15
4.4.00.0000.02710.15
4.3.110.0000.02710.15
4.3.100.0000.01710.15
4.3.90.0030.02310.15
4.3.80.0000.05010.15
4.3.70.0070.02010.15
4.3.60.0000.02010.15
4.3.50.0030.01310.15
4.3.40.0100.04310.15
4.3.30.0000.01710.15
4.3.20.0000.01310.15
4.3.10.0000.01710.15
4.3.00.0030.02310.15

preferences:
32.47 ms | 401 KiB | 5 Q