3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = ['red', 'green', 'blue']; $choices = []; foreach ($e as $a) { $choices[$a] = $a; } var_dump($choices); var_dump(array_combine($a, $a));

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.60.0080.00816.50
8.3.50.0140.00418.18
8.3.40.0100.01018.36
8.3.30.0150.00319.09
8.3.20.0080.00020.31
8.3.10.0000.00821.90
8.3.00.0080.00019.05
8.2.180.0120.00918.16
8.2.170.0040.01222.96
8.2.160.0110.00422.05
8.2.150.0040.00424.18
8.2.140.0000.00924.66
8.2.130.0050.00326.16
8.2.120.0030.00717.93
8.2.110.0090.00020.35
8.2.100.0110.00020.54
8.2.90.0040.00419.25
8.2.80.0030.00617.97
8.2.70.0000.00917.50
8.2.60.0030.00517.93
8.2.50.0000.00818.07
8.2.40.0040.00418.31
8.2.30.0050.00319.36
8.2.20.0040.00417.64
8.2.10.0000.00718.09
8.2.00.0000.00717.81
8.1.270.0040.00718.95
8.1.260.0040.00426.35
8.1.250.0100.00028.09
8.1.240.0060.00320.92
8.1.230.0070.00419.05
8.1.220.0050.00317.74
8.1.210.0000.00818.77
8.1.200.0090.00017.23
8.1.190.0000.00817.13
8.1.180.0030.00618.10
8.1.170.0050.00318.65
8.1.160.0000.00721.95
8.1.150.0030.00618.84
8.1.140.0000.00717.40
8.1.130.0000.00717.88
8.1.120.0050.00317.48
8.1.110.0070.00017.35
8.1.100.0000.00717.51
8.1.90.0030.00517.51
8.1.80.0070.00017.48
8.1.70.0070.00017.39
8.1.60.0000.00917.43
8.1.50.0040.00717.52
8.1.40.0050.00317.50
8.1.30.0030.00517.50
8.1.20.0040.00417.68
8.1.10.0050.00317.46
8.1.00.0000.00817.43
8.0.300.0000.00719.79
8.0.290.0000.00716.75
8.0.280.0040.00418.32
8.0.270.0000.00717.33
8.0.260.0030.00317.26
8.0.250.0050.00216.99
8.0.240.0030.00316.91
8.0.230.0080.00017.04
8.0.220.0070.00016.88
8.0.210.0000.00716.83
8.0.200.0030.00316.98
8.0.190.0000.00717.09
8.0.180.0000.00716.98
8.0.170.0040.00417.00
8.0.160.0040.00417.00
8.0.150.0040.00316.77
8.0.140.0000.00716.89
8.0.130.0030.00313.27
8.0.120.0040.00416.83
8.0.110.0040.00416.86
8.0.100.0040.00416.79
8.0.90.0040.00416.84
8.0.80.0120.00916.95
8.0.70.0050.00216.91
8.0.60.0000.00717.00
8.0.50.0040.00416.73
8.0.30.0110.01217.10
8.0.20.0120.00717.40
8.0.10.0000.00716.99
8.0.00.0150.00316.74
7.4.330.0000.00615.03
7.4.320.0030.00316.59
7.4.300.0000.00616.50
7.4.290.0040.00416.46
7.4.280.0060.00316.59
7.4.270.0030.00316.49
7.4.260.0000.00816.53
7.4.250.0000.00716.54
7.4.240.0030.00416.58
7.4.230.0000.00716.51
7.4.220.0090.00916.66
7.4.210.0110.00416.68
7.4.200.0030.00316.63
7.4.160.0120.00316.35
7.4.150.0140.00317.40
7.4.140.0070.01317.86
7.4.130.0110.01016.54
7.4.120.0090.00716.43
7.4.110.0080.01416.29
7.4.100.0200.00716.46
7.4.90.0030.01316.48
7.4.80.0060.01219.39
7.4.70.0090.00916.53
7.4.60.0130.00316.53
7.4.50.0000.00416.41
7.4.40.0030.01616.61
7.4.30.0080.01216.39
7.4.00.0150.00014.64
7.3.330.0030.00313.02
7.3.320.0050.00013.14
7.3.310.0030.00316.14
7.3.300.0030.00316.30
7.3.290.0050.00216.31
7.3.280.0080.00816.24
7.3.270.0130.00417.40
7.3.260.0110.00716.47
7.3.250.0100.00816.49
7.3.240.0150.00416.52
7.3.230.0000.01916.39
7.3.210.0100.00716.43
7.3.200.0080.00819.39
7.3.190.0080.00716.44
7.3.180.0100.00716.38
7.3.170.0090.01216.55
7.3.160.0100.00716.52
7.3.120.0070.01114.70
7.3.110.0100.00714.56
7.3.100.0060.00814.81
7.3.90.0040.01114.68
7.3.80.0070.01014.79
7.3.70.0000.01414.60
7.3.60.0080.00814.74
7.3.50.0060.00314.65
7.3.40.0030.01214.86
7.3.30.0040.01114.75
7.3.20.0040.01416.55
7.3.10.0080.00616.52
7.3.00.0040.00816.59
7.2.330.0070.01216.48
7.2.320.0060.01016.67
7.2.310.0060.01116.48
7.2.300.0040.01216.33
7.2.290.0090.00916.44
7.2.240.0080.01114.85
7.2.230.0120.00315.16
7.2.220.0100.00314.90
7.2.210.0030.01014.84
7.2.200.0060.00914.83
7.2.190.0080.00815.05
7.2.180.0000.01514.80
7.2.170.0080.01114.98
7.2.160.0000.01314.95
7.2.150.0000.01416.92
7.2.140.0060.00616.88
7.2.130.0030.01916.75
7.2.120.0040.01816.90
7.2.110.0060.00916.75
7.2.100.0060.01316.77
7.2.90.0090.00616.57
7.2.80.0050.00516.99
7.2.70.0070.00716.97
7.2.60.0080.00516.89
7.2.50.0030.00716.97
7.2.40.0090.00916.96
7.2.30.0100.00716.79
7.2.20.0100.00716.68
7.2.10.0110.00416.84
7.2.00.0030.01018.19
7.1.330.0090.00915.70
7.1.320.0040.01115.84
7.1.310.0070.00815.79
7.1.300.0060.01015.92
7.1.290.0100.00015.71
7.1.280.0100.00615.75
7.1.270.0070.01115.95
7.1.260.0040.01115.84
7.1.250.0120.00315.68
7.1.200.0040.00415.86
7.1.100.0100.00317.98
7.1.70.0030.00317.04
7.1.60.0150.00919.46
7.1.50.0140.00534.71
7.1.00.0070.07322.43
7.0.200.0750.00314.61
7.0.140.0000.07721.98
7.0.60.0070.08319.90
7.0.50.0070.06017.90
7.0.40.0000.04720.05
7.0.30.0270.07020.15
7.0.20.0230.04720.09
7.0.10.0200.07320.09
7.0.00.0070.07020.09
5.6.280.0000.07721.02
5.6.210.0070.07720.71
5.6.200.0030.04318.15
5.6.190.0130.08020.41
5.6.180.0270.07320.47
5.6.170.0370.06020.61
5.6.160.0170.08320.38
5.6.150.0100.03718.15
5.6.140.0100.03318.18
5.6.130.0100.06718.17
5.6.120.0100.08321.03
5.6.110.0070.07721.01
5.6.100.0070.05021.10
5.6.90.0070.09321.02
5.6.80.0200.06720.28
5.5.350.0370.07020.40
5.5.340.0130.07317.98
5.5.330.0070.04020.07
5.5.320.0400.08020.30
5.5.310.0370.04720.20
5.5.300.0100.04017.91
5.5.290.0100.06717.91
5.5.280.0130.06720.79
5.5.270.0070.08720.85
5.5.260.0130.07720.74
5.5.250.0130.07720.58
5.5.240.0100.07720.34
5.4.450.0130.05319.46
5.4.440.0670.06719.61
5.4.430.1370.04719.45
5.4.420.0800.05319.63
5.4.410.0800.06019.45
5.4.400.1070.06018.81
5.4.390.0230.04718.53
5.4.380.0170.05718.72
5.4.370.0200.05018.72
5.4.360.0170.05718.77
5.4.350.0130.06018.68
5.4.340.0170.05718.51
5.4.320.0200.05318.58
5.4.310.0130.05718.66
5.4.300.0100.05718.66
5.4.290.0270.04018.66
5.4.280.0230.05318.77
5.4.270.0130.06018.58
5.4.260.0300.04018.77
5.4.250.0300.04318.71
5.4.240.0330.04018.46
5.4.230.0200.05018.67
5.4.220.0170.05318.71
5.4.210.0070.06018.48
5.4.200.0170.05016.75
5.4.190.0230.04718.63
5.4.180.0200.05718.54
5.4.170.0100.06018.66
5.4.160.0130.05718.54
5.4.150.0230.05318.71
5.4.140.0170.05316.23
5.4.130.0270.04316.17
5.4.120.0230.05016.05
5.4.110.0230.05716.06
5.4.100.0230.06016.30
5.4.90.0100.06016.26
5.4.80.0230.04316.15
5.4.70.0100.06016.23
5.4.60.0270.04016.00
5.4.50.0170.05016.28
5.4.40.0200.05316.22
5.4.30.0130.06016.28
5.4.20.0170.05715.99
5.4.10.0100.05716.05
5.4.00.0130.05315.73
5.3.290.0170.06314.72
5.3.280.0130.05714.54
5.3.270.0200.05714.62
5.3.260.0170.06314.71
5.3.250.0130.06014.51
5.3.240.0170.05714.68
5.3.230.0300.05714.51
5.3.220.0130.06014.55
5.3.210.0200.05314.55
5.3.200.0230.04714.66
5.3.190.0130.05714.46
5.3.180.0070.06314.54
5.3.170.0170.05314.53
5.3.160.0270.04314.47
5.3.150.0200.04714.56
5.3.140.0130.05714.52
5.3.130.0070.06314.59
5.3.120.0130.06714.64
5.3.110.0330.04014.51
5.3.100.0270.04713.95
5.3.90.0300.04013.97
5.3.80.0200.05014.01
5.3.70.0230.04313.96
5.3.60.0200.05713.96
5.3.50.0130.05713.93
5.3.40.0230.04713.93
5.3.30.0100.05713.86
5.3.20.0130.05313.66
5.3.10.0170.05013.57
5.3.00.0230.04713.58
5.2.170.0100.04711.17
5.2.160.0130.04711.05
5.2.150.0100.05011.09
5.2.140.0130.04311.05
5.2.130.0230.03011.01
5.2.120.0100.04311.03
5.2.110.0100.04311.03
5.2.100.0130.04311.14
5.2.90.0070.05311.25
5.2.80.0130.04711.01
5.2.70.0170.04311.06
5.2.60.0100.05011.05
5.2.50.0130.04711.00
5.2.40.0030.05310.94
5.2.30.0300.03011.11
5.2.20.0200.04010.99
5.2.10.0130.05010.90
5.2.00.0130.04010.74
5.1.60.0130.0339.98
5.1.50.0100.03710.13
5.1.40.0070.04010.10
5.1.30.0230.02710.32
5.1.20.0130.04010.32
5.1.10.0070.04010.05
5.1.00.0100.03710.04
5.0.50.0130.0208.54
5.0.40.0000.0338.43
5.0.30.0070.0438.34
5.0.20.0030.0338.23
5.0.10.0070.0308.20
5.0.00.0070.0508.14
4.4.90.0030.0235.87
4.4.80.0000.0275.81
4.4.70.0100.0205.91
4.4.60.0100.0175.88
4.4.50.0030.0275.91
4.4.40.0030.0435.86
4.4.30.0000.0275.83
4.4.20.0070.0305.88
4.4.10.0000.0275.93
4.4.00.0070.0335.95
4.3.110.0170.0175.81
4.3.100.0100.0205.78
4.3.90.0030.0305.79
4.3.80.0070.0405.89
4.3.70.0100.0235.77
4.3.60.0070.0205.80
4.3.50.0070.0205.77
4.3.40.0100.0305.75
4.3.30.0000.0274.63
4.3.20.0070.0204.67
4.3.10.0070.0204.48
4.3.00.0030.0279.46

preferences:
48.68 ms | 400 KiB | 5 Q