3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time = microtime(true); for ($i = 0; $i < 10000; $i++) { $array = array(); $str = '|' . implode('|', array_keys($_SERVER)); do { if (false !== $pos = strpos($str, '|SCRIPT_')) { if (false !== $pos2 = strpos($str, '|', $pos + 1)) { $array[] = substr($str, $pos + 1, $pos2 - $pos - 1); $str = substr($str, $pos2); } else { $array[] = substr($str, $pos + 1); $str = ''; } } } while ($pos !== false && $str); } var_dump($array, microtime(true) - $time);

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.4.00.0000.04315.14
7.3.120.0000.04215.16
7.3.110.0030.03615.01
7.3.100.0030.02814.60
7.3.90.0030.02814.72
7.3.80.0030.02714.75
7.3.70.0030.02814.85
7.3.60.0120.01814.86
7.3.50.0100.02314.91
7.3.40.0000.03114.81
7.3.30.0060.02514.52
7.3.20.0070.02316.60
7.3.10.0100.03116.31
7.3.00.0070.02916.60
7.2.250.0030.03515.24
7.2.240.0100.03414.70
7.2.230.0070.02814.71
7.2.220.0070.02615.07
7.2.210.0100.02215.10
7.2.200.0120.01814.95
7.2.190.0100.02315.00
7.2.180.0070.02715.18
7.2.170.0090.02215.23
7.2.130.0150.02716.61
7.2.120.0070.03216.43
7.2.110.0070.02616.45
7.2.100.0130.03016.72
7.2.90.0180.03316.77
7.2.80.0130.02616.78
7.2.70.0130.03017.04
7.2.60.0120.02616.42
7.2.50.0040.03916.82
7.2.40.0100.03016.82
7.2.30.0160.02516.71
7.2.20.0030.02716.84
7.2.10.0100.02416.73
7.2.00.0100.02018.04
7.1.330.0040.03215.54
7.1.320.0000.03715.80
7.1.310.0000.03515.89
7.1.300.0070.03015.51
7.1.290.0030.03016.00
7.1.280.0030.03015.62
7.1.270.0100.02915.54
7.1.260.0000.03115.63
7.1.250.0160.03115.45
7.1.70.0000.02017.18
7.1.60.0030.03119.61
7.1.50.0070.02617.00
7.1.00.0000.09322.27
7.0.200.1120.01414.55
7.0.140.0030.09322.12
7.0.100.0170.04019.85
7.0.90.0170.05319.86
7.0.80.0100.06319.91
7.0.70.0170.09319.93
7.0.60.0070.08319.90
7.0.50.0100.04720.34
7.0.40.0070.04020.10
7.0.30.0000.05720.14
7.0.20.0030.04720.00
7.0.10.0100.04320.10
7.0.00.0030.04320.10
5.6.280.0030.13021.11
5.6.250.0000.10320.73
5.6.240.0030.10020.61
5.6.230.0030.08720.51
5.6.220.0030.13020.74
5.6.210.0200.07020.77
5.6.200.0070.08721.09
5.6.190.0130.07321.03
5.6.180.0070.07021.18
5.6.170.0130.05321.06
5.6.160.0030.06021.04
5.6.150.0000.06321.04
5.6.140.0000.07321.01
5.6.130.0070.07321.07
5.6.120.0030.06021.02
5.6.110.0000.08020.96
5.6.100.0000.07321.09
5.6.90.0000.07721.00
5.6.80.0000.06720.42
5.6.70.0070.05720.44
5.6.60.0030.07020.46
5.6.50.0030.08320.41
5.6.40.0100.11020.39
5.6.30.0070.12320.32
5.6.20.0130.10720.43
5.6.10.0100.07020.40
5.6.00.0100.11720.43
5.5.380.0030.13320.40
5.5.370.0170.05720.39
5.5.360.0030.11320.35
5.5.350.0030.07720.46
5.5.340.0070.07020.64
5.5.330.0030.06020.77
5.5.320.0030.06020.80
5.5.310.0000.06720.79
5.5.300.0100.05720.83
5.5.290.0100.05720.86
5.5.280.0030.08020.73
5.5.270.0100.05720.83
5.5.260.0000.07720.75
5.5.250.0070.07320.57
5.5.240.0030.06020.29
5.5.230.0070.06720.18
5.5.220.0070.06720.00
5.5.210.0070.06020.18
5.5.200.0100.08720.16
5.5.190.0100.08020.19
5.5.180.0030.12020.28
5.5.160.0070.11320.13
5.5.150.0030.12020.23
5.5.140.0070.09720.25
5.5.130.0070.11320.28
5.5.120.0100.12320.15
5.5.110.0200.10720.13
5.5.100.0030.11320.10
5.5.90.0100.12720.11
5.5.80.0130.11720.06
5.5.70.0200.09020.16
5.5.60.0100.12020.11
5.5.50.0100.11020.11
5.5.40.0070.10320.08
5.5.30.0030.13020.10
5.5.20.0070.07020.09
5.5.10.0070.11720.07
5.5.00.0130.11020.04
5.4.450.0000.07719.38
5.4.440.0030.07019.39
5.4.430.0000.07319.35
5.4.420.0100.06319.28
5.4.410.0000.06019.23
5.4.400.0030.07019.23
5.4.390.0030.05719.06
5.4.380.0000.09319.09
5.4.370.0200.11718.95
5.4.360.0100.11718.83
5.4.350.0200.10719.05
5.4.340.0070.09019.07
5.4.320.0070.11719.03
5.4.310.0030.11718.95
5.4.300.0130.10319.23
5.4.290.0070.12718.97
5.4.280.0100.12019.04
5.4.270.0100.11318.96
5.4.260.0030.11019.24
5.4.250.0070.11719.05
5.4.240.0100.12019.14
5.4.230.0000.12719.02
5.4.220.0030.13018.80
5.4.210.0000.13018.80
5.4.200.0130.12019.07
5.4.190.0100.06718.96
5.4.180.0170.10719.11
5.4.170.0200.11018.94
5.4.160.0100.11319.05
5.4.150.0000.12319.04
5.4.140.0070.11316.27
5.4.130.0100.06316.36
5.4.120.0070.10316.34
5.4.110.0000.12716.41
5.4.100.0100.09316.21
5.4.90.0070.12716.31
5.4.80.0070.08016.39
5.4.70.0030.09316.34
5.4.60.0100.12016.24
5.4.50.0000.12016.18
5.4.40.0000.11716.26
5.4.30.0070.10716.39
5.4.20.0070.10716.27
5.4.10.0030.12316.22
5.4.00.0070.10315.79
5.3.290.0030.12314.61
5.3.280.0070.11314.42
5.3.270.0100.11714.57
5.3.260.0100.09714.61
5.3.250.0100.12014.56
5.3.240.0030.11314.57
5.3.230.0030.14014.42
5.3.220.0130.11314.43
5.3.210.0100.10714.48
5.3.200.0070.12014.54
5.3.190.0100.10314.52
5.3.180.0070.12714.45
5.3.170.0070.06714.54
5.3.160.0070.07314.56
5.3.150.0100.12014.55
5.3.140.0070.09714.53
5.3.130.0100.10714.50
5.3.120.0000.09314.54
5.3.110.0030.11314.54
5.3.100.0000.10713.90
5.3.90.0030.12013.96
5.3.80.0030.12714.02
5.3.70.0100.10314.02
5.3.60.0130.11013.97
5.3.50.0030.08713.93
5.3.40.0030.08313.94
5.3.30.0100.12313.68
5.3.20.0030.11713.66
5.3.10.0100.10313.52
5.3.00.0000.12713.41
5.2.170.0000.12311.01
5.2.160.0030.06311.00
5.2.150.0100.09310.97
5.2.140.0030.08011.19
5.2.130.0030.06310.93
5.2.120.0030.10710.94
5.2.110.0070.11710.96
5.2.100.0070.10311.09
5.2.90.0070.10711.14
5.2.80.0030.11711.11
5.2.70.0100.09711.08
5.2.60.0070.10310.91
5.2.50.0030.11010.98
5.2.40.0070.06711.00
5.2.30.0070.06010.98
5.2.20.0070.05310.96
5.2.10.0070.08310.90
5.2.00.0030.08310.80
5.1.60.0030.0439.99
5.1.50.0000.08710.07
5.1.40.0070.04010.11
5.1.30.0030.09310.36
5.1.20.0130.05010.38
5.1.10.0030.08710.14
5.1.00.0000.05310.21
5.0.50.0000.0808.75
5.0.40.0000.0638.75
5.0.30.0000.0638.75
5.0.20.0070.0438.75
5.0.10.0070.0808.75
5.0.00.0030.0608.75
4.4.90.0000.0478.75
4.4.80.0030.0808.75
4.4.70.0000.0438.75
4.4.60.0030.0778.75
4.4.50.0030.0838.75
4.4.40.0030.0938.75
4.4.30.0000.0778.75
4.4.20.0070.0438.75
4.4.10.0030.0478.75
4.4.00.0030.0808.75
4.3.110.0100.0438.75
4.3.100.0030.0678.75
4.3.90.0000.0808.75
4.3.80.0000.0638.75
4.3.70.0070.0708.75
4.3.60.0000.0538.75
4.3.50.0000.0638.75
4.3.40.0000.0838.75
4.3.30.0000.0538.75
4.3.20.0000.0478.75
4.3.10.0100.0308.75
4.3.00.0000.0738.75

preferences:
38.18 ms | 401 KiB | 5 Q