3v4l.org

run code in 300+ PHP versions simultaneously
<?php $numbers = array(1, 2, 3, 4, 5); $text = array(1 => 'ONE', 2 => 'TWO', 3 => 'THREE', 4 => 'FOUR', 5 => 'FIVE'); foreach($numbers as $number){ echo $number . ':' . $text[$number] . "\n"; }

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)
8.3.40.0110.00318.57
8.3.30.0000.01418.67
8.3.20.0040.00418.72
8.3.10.0040.00420.36
8.3.00.0030.00517.50
8.2.170.0120.00322.96
8.2.160.0080.00821.93
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0060.00326.16
8.2.120.0040.00419.95
8.2.110.0070.01020.54
8.2.100.0060.00618.03
8.2.90.0040.00419.30
8.2.80.0050.00317.97
8.2.70.0060.00317.50
8.2.60.0060.00317.93
8.2.50.0080.00018.07
8.2.40.0000.00718.28
8.2.30.0040.00418.05
8.2.20.0000.00717.70
8.2.10.0070.00017.64
8.2.00.0000.00817.72
8.1.270.0000.00824.66
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0100.01022.19
8.1.230.0120.00017.58
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0060.00317.22
8.1.190.0000.00717.53
8.1.180.0000.00918.10
8.1.170.0000.00818.89
8.1.160.0000.00718.78
8.1.150.0000.00718.64
8.1.140.0050.00317.49
8.1.130.0030.00317.88
8.1.120.0000.00717.35
8.1.110.0040.00417.44
8.1.100.0040.00417.35
8.1.90.0000.00717.41
8.1.80.0040.00417.50
8.1.70.0030.00317.41
8.1.60.0030.00517.59
8.1.50.0040.00417.45
8.1.40.0030.00617.55
8.1.30.0050.00317.57
8.1.20.0040.00417.50
8.1.10.0000.00817.54
8.1.00.0040.00417.51
8.0.300.0040.00418.77
8.0.290.0030.00616.75
8.0.280.0070.00018.34
8.0.270.0050.00217.23
8.0.260.0050.00318.31
8.0.250.0000.00716.96
8.0.240.0000.00916.93
8.0.230.0070.00016.95
8.0.220.0000.00716.93
8.0.210.0050.00316.88
8.0.200.0040.00416.89
8.0.190.0040.00416.95
8.0.180.0000.00716.86
8.0.170.0030.00616.80
8.0.160.0000.00716.86
8.0.150.0000.00716.78
8.0.140.0040.00416.82
8.0.130.0030.00313.27
8.0.120.0070.00016.86
8.0.110.0030.00516.92
8.0.100.0080.00016.77
8.0.90.0000.00716.88
8.0.80.0110.00616.93
8.0.70.0040.00416.80
8.0.60.0000.00716.70
8.0.50.0040.00416.84
8.0.30.0100.01217.13
8.0.20.0100.01017.16
8.0.10.0030.00316.91
8.0.00.0080.01316.77
7.4.330.0030.00312.95
7.4.320.0030.00316.50
7.4.300.0000.00616.44
7.4.290.0000.00616.42
7.4.280.0040.00416.56
7.4.270.0030.00316.63
7.4.260.0030.00313.21
7.4.250.0040.00416.54
7.4.240.0000.00716.42
7.4.230.0000.00716.34
7.4.220.0070.01116.65
7.4.210.0040.01016.57
7.4.200.0070.00016.40
7.4.190.0070.00016.67
7.4.160.0120.00316.37
7.4.150.0140.01116.46
7.4.140.0080.00816.42
7.4.130.0140.00416.40
7.4.120.0080.00916.60
7.4.110.0070.01616.57
7.4.100.0060.00916.51
7.4.90.0130.01016.48
7.4.80.0140.00316.48
7.4.70.0200.00316.39
7.4.60.0160.00316.54
7.4.50.0000.00816.37
7.4.40.0060.00616.63
7.4.30.0060.01016.26
7.4.00.0090.00915.10
7.3.330.0000.00713.10
7.3.320.0050.00013.13
7.3.310.0040.00416.27
7.3.300.0000.00716.15
7.3.290.0130.00616.29
7.3.280.0080.00716.26
7.3.270.0100.00716.27
7.3.260.0160.00816.32
7.3.250.0100.01016.43
7.3.240.0060.01016.41
7.3.230.0060.01016.32
7.3.210.0060.01116.39
7.3.200.0160.00319.39
7.3.190.0170.00516.71
7.3.180.0040.01116.36
7.3.170.0090.01516.57
7.3.160.0060.00916.64
7.3.120.0080.00814.84
7.3.110.0070.01114.84
7.3.100.0130.00314.89
7.3.90.0090.00614.84
7.3.80.0080.00414.82
7.3.70.0090.00614.82
7.3.60.0070.01014.86
7.3.50.0040.01214.67
7.3.40.0100.00714.84
7.3.30.0030.01014.58
7.3.20.0030.01216.62
7.3.10.0070.00716.91
7.3.00.0030.01016.75
7.2.330.0150.00616.47
7.2.320.0140.00516.43
7.2.310.0270.00416.80
7.2.300.0030.01516.33
7.2.290.0100.00716.64
7.2.250.0130.00714.74
7.2.240.0100.01015.26
7.2.230.0030.01315.23
7.2.220.0070.00315.24
7.2.210.0070.00415.14
7.2.200.0090.00615.10
7.2.190.0040.00814.98
7.2.180.0100.00615.14
7.2.170.0110.00414.84
7.2.60.0090.00316.93
7.2.00.0090.00619.48
7.1.330.0090.00615.88
7.1.320.0080.00415.52
7.1.310.0090.00915.84
7.1.300.0080.00415.93
7.1.290.0100.00715.83
7.1.280.0070.00316.02
7.1.270.0040.00715.84
7.1.260.0130.00315.82
7.1.200.0090.00615.77
7.1.100.0080.00318.12
7.1.70.0000.00717.37
7.1.60.0090.01519.40
7.1.50.0200.01334.73
7.1.00.0030.07022.48
7.0.200.0190.00614.80
7.0.140.0070.07022.15
7.0.120.0070.07022.03
7.0.60.0030.08319.88
7.0.50.0130.06017.79
7.0.40.0070.04020.24
7.0.30.0300.07020.16
7.0.20.0130.04720.21
7.0.10.0000.08320.00
7.0.00.0070.04020.09
5.6.280.0000.07720.91
5.6.210.0100.08020.77
5.6.200.0070.08318.18
5.6.190.0170.05020.42
5.6.180.0300.05020.34
5.6.170.0230.05020.46
5.6.160.0130.07720.44
5.6.150.0030.06718.15
5.6.140.0030.04318.22
5.6.130.0070.03718.21
5.6.120.0030.05321.14
5.6.110.0030.04321.13
5.6.100.0130.05320.97
5.6.90.0070.08320.95
5.6.80.0200.07020.38
5.5.350.0070.08720.46
5.5.340.0070.04717.92
5.5.330.0130.08320.25
5.5.320.0600.06320.50
5.5.310.0130.05020.29
5.5.300.0070.07017.95
5.5.290.0000.04717.92
5.5.280.0030.05020.87
5.5.270.0130.08020.88
5.5.260.0130.08020.86
5.5.250.0070.06020.58
5.5.240.0200.07320.23
5.4.450.0030.09319.47
5.4.440.0070.08319.11
5.4.430.0070.06019.41
5.4.420.0000.07019.50
5.4.410.0070.05719.38
5.4.400.0070.05719.18
5.4.390.0100.07718.92
5.4.380.0030.05318.79
5.4.370.0030.05019.14
5.4.360.0100.06319.16
5.4.350.0000.04319.17
5.4.340.0100.07019.00
5.4.320.0070.03719.16
5.4.310.0100.05718.79
5.4.300.0130.07319.10
5.4.290.0170.05019.08
5.4.280.0100.07019.14
5.4.270.0070.07018.80
5.4.260.0070.04318.91
5.4.250.0100.06018.80
5.4.240.0130.06718.90
5.4.230.0070.04719.08
5.4.220.0070.06719.07
5.4.210.0100.07318.99
5.4.200.0030.06019.07
5.4.190.0070.07318.91
5.4.180.0130.07019.16
5.4.170.0100.04319.18
5.4.160.0030.08319.16
5.4.150.0030.05018.77
5.4.140.0100.07016.21
5.4.130.0130.06016.24
5.4.120.0000.04016.24
5.4.110.0070.03316.39
5.4.100.0030.03716.39
5.4.90.0030.03716.36
5.4.80.0100.03016.34
5.4.70.0030.03316.35
5.4.60.0030.04316.30
5.4.50.0000.03716.24
5.4.40.0000.04316.32
5.4.30.0100.02716.25
5.4.20.0070.04016.27
5.4.10.0030.04716.57
5.4.00.0030.03715.69
5.3.290.0000.05314.62
5.3.280.0000.05014.38
5.3.270.0030.05014.53
5.3.260.0170.06314.54
5.3.250.0030.05014.55
5.3.240.0070.06014.39
5.3.230.0030.06314.39
5.3.220.0000.07714.52
5.3.210.0100.04714.66
5.3.200.0070.04014.50
5.3.190.0030.03714.54
5.3.180.0070.03314.48
5.3.170.0070.03714.50
5.3.160.0070.03314.35
5.3.150.0070.03314.65
5.3.140.0100.03014.48
5.3.130.0000.04014.56
5.3.120.0000.04014.53
5.3.110.0030.03714.51
5.3.100.0030.03713.96
5.3.90.0070.03313.95
5.3.80.0100.03013.99
5.3.70.0000.04013.99
5.3.60.0000.03714.02
5.3.50.0070.03013.78
5.3.40.0030.03713.88
5.3.30.0030.03313.73
5.3.20.0170.02013.67
5.3.10.0070.03013.45
5.3.00.0070.03013.57
5.2.170.0070.02711.07
5.2.160.0030.03011.04
5.2.150.0070.02711.04
5.2.140.0030.02711.08
5.2.130.0000.03011.11
5.2.120.0000.03011.04
5.2.110.0030.03011.03
5.2.100.0030.02711.18
5.2.90.0100.02010.92
5.2.80.0000.03311.04
5.2.70.0070.03010.99
5.2.60.0000.03711.04
5.2.50.0030.03310.89
5.2.40.0030.02711.07
5.2.30.0030.03010.90
5.2.20.0030.02710.89
5.2.10.0000.03010.89
5.2.00.0000.03710.86
5.1.60.0070.0209.89
5.1.50.0000.0279.95
5.1.40.0000.0239.99
5.1.30.0070.02010.36
5.1.20.0000.03010.36
5.1.10.0030.02710.08
5.1.00.0000.0279.97
5.0.50.0030.0208.50
5.0.40.0100.0408.46
5.0.30.0130.0508.36
5.0.20.0070.0308.21
5.0.10.0030.0438.14
5.0.00.0030.0508.13
4.4.90.0030.0137.66
4.4.80.0000.0137.66
4.4.70.0070.0107.66
4.4.60.0030.0137.66
4.4.50.0000.0177.66
4.4.40.0030.0277.66
4.4.30.0000.0177.66
4.4.20.0000.0177.66
4.4.10.0000.0177.66
4.4.00.0070.0207.66
4.3.110.0000.0277.66
4.3.100.0000.0177.66
4.3.90.0070.0237.66
4.3.80.0000.0577.66
4.3.70.0030.0277.66
4.3.60.0000.0207.66
4.3.50.0000.0377.66
4.3.40.0000.0537.66
4.3.30.0000.0177.66
4.3.20.0030.0137.66
4.3.10.0030.0207.66
4.3.00.0000.0237.66

preferences:
38.64 ms | 400 KiB | 5 Q