3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array(array(1, 2, 'last'), array(3, 4, 'last')); $result = array(); foreach ($data as $arr) foreach ($arr as $val) $result[] = $val; print_r($result);

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.70.0150.00616.74
8.3.60.0210.00018.56
8.3.50.0130.00621.14
8.3.40.0110.00318.70
8.3.30.0040.01120.02
8.3.20.0080.00020.16
8.3.10.0040.00421.94
8.3.00.0050.00322.52
8.2.180.0060.00916.50
8.2.170.0030.01222.96
8.2.160.0050.00822.30
8.2.150.0050.00324.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0070.00020.72
8.2.110.0030.00620.39
8.2.100.0080.00320.07
8.2.90.0040.00419.35
8.2.80.0000.00819.11
8.2.70.0040.00417.38
8.2.60.0030.00518.05
8.2.50.0080.00018.07
8.2.40.0040.00418.21
8.2.30.0040.00419.35
8.2.20.0040.00417.81
8.2.10.0060.00317.67
8.2.00.0040.00417.56
8.1.280.0130.00725.92
8.1.270.0080.00023.99
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0090.00023.98
8.1.230.0090.00322.68
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00617.23
8.1.190.0040.00417.29
8.1.180.0090.00018.10
8.1.170.0050.00318.63
8.1.160.0030.00518.75
8.1.150.0040.00418.54
8.1.140.0050.00217.44
8.1.130.0000.00717.83
8.1.120.0030.00517.42
8.1.110.0080.00017.43
8.1.100.0040.00417.45
8.1.90.0000.00717.32
8.1.80.0000.00717.50
8.1.70.0030.00317.38
8.1.60.0030.00617.41
8.1.50.0030.00617.45
8.1.40.0040.00417.53
8.1.30.0050.00317.61
8.1.20.0030.00617.70
8.1.10.0040.00417.41
8.1.00.0030.00517.42
8.0.300.0040.00418.77
8.0.290.0050.00317.18
8.0.280.0030.00318.48
8.0.270.0000.00717.24
8.0.260.0030.00316.81
8.0.250.0030.00316.83
8.0.240.0020.00516.86
8.0.230.0060.00316.92
8.0.220.0000.00616.89
8.0.210.0030.00316.90
8.0.200.0000.00716.92
8.0.190.0050.00316.78
8.0.180.0000.00716.96
8.0.170.0070.00016.95
8.0.160.0040.00416.76
8.0.150.0000.00716.90
8.0.140.0000.00816.89
8.0.130.0000.00613.32
8.0.120.0080.00016.79
8.0.110.0070.00016.86
8.0.100.0050.00316.84
8.0.90.0080.00016.91
8.0.80.0110.00316.86
8.0.70.0040.00416.95
8.0.60.0070.00016.77
8.0.50.0040.00416.74
8.0.30.0090.00917.10
8.0.20.0070.01117.40
8.0.10.0000.00716.86
8.0.00.0140.00716.73
7.4.330.0020.00216.76
7.4.320.0040.00416.50
7.4.300.0000.00616.50
7.4.290.0040.00416.54
7.4.280.0030.00316.59
7.4.270.0070.00016.59
7.4.260.0060.00013.25
7.4.250.0000.00716.56
7.4.240.0030.00316.38
7.4.230.0000.00716.46
7.4.220.0060.01216.58
7.4.210.0070.00816.59
7.4.200.0030.00316.57
7.4.190.0070.00016.76
7.4.160.0130.00316.48
7.4.150.0060.01217.40
7.4.140.0110.01017.86
7.4.130.0120.00916.36
7.4.120.0100.00716.50
7.4.110.0110.00516.65
7.4.100.0150.00616.48
7.4.90.0070.01016.48
7.4.80.0180.00019.39
7.4.70.0060.00916.35
7.4.60.0090.01316.30
7.4.50.0060.00316.41
7.4.40.0060.01022.77
7.4.30.0060.00916.41
7.4.00.0060.01114.90
7.3.330.0050.00013.01
7.3.320.0050.00013.09
7.3.310.0000.00716.30
7.3.300.0040.00416.21
7.3.290.0070.00716.28
7.3.280.0070.00916.30
7.3.270.0110.00617.40
7.3.260.0170.00718.24
7.3.250.0110.00716.51
7.3.240.0060.01116.36
7.3.230.0100.00716.39
7.3.210.0100.00616.71
7.3.200.0070.01019.39
7.3.190.0110.00816.48
7.3.180.0060.00916.18
7.3.170.0050.01116.30
7.3.160.0090.00616.23
7.3.120.0030.01214.86
7.3.110.0070.01014.83
7.3.100.0100.00714.91
7.3.90.0060.00614.68
7.3.80.0060.00915.11
7.3.70.0000.00814.52
7.3.60.0070.00714.82
7.3.50.0000.00914.93
7.3.40.0140.00014.91
7.3.30.0100.00014.91
7.3.20.0090.00316.83
7.3.10.0100.00616.47
7.3.00.0080.00416.68
7.2.330.0130.00316.76
7.2.320.0120.00616.68
7.2.310.0080.00916.34
7.2.300.0070.01016.30
7.2.290.0030.01416.84
7.2.250.0100.01015.09
7.2.240.0120.00915.10
7.2.230.0060.00914.84
7.2.220.0000.01215.14
7.2.210.0040.00815.18
7.2.200.0110.00414.91
7.2.190.0000.01014.99
7.2.180.0030.00614.89
7.2.170.0000.01415.15
7.2.00.0060.00819.24
7.1.330.0000.01415.87
7.1.320.0060.00615.71
7.1.310.0000.01015.72
7.1.300.0000.01415.68
7.1.290.0060.00615.52
7.1.280.0030.00515.79
7.1.270.0080.00815.95
7.1.260.0000.01215.77
7.1.100.0000.01518.27
7.1.70.0030.00917.16
7.1.60.0130.01019.17
7.1.50.0060.01917.03
7.1.00.0070.03022.44
7.0.200.0050.00316.95
7.0.140.0030.07022.08
7.0.60.0030.06319.91
7.0.50.0100.03317.88
7.0.40.0000.06319.96
7.0.30.0300.06320.16
7.0.20.0130.08720.30
7.0.10.0030.09020.26
7.0.00.0130.07720.18
5.6.280.0000.07720.98
5.6.210.0100.08720.67
5.6.200.0070.04018.12
5.6.190.0070.07320.33
5.6.180.3730.04720.41
5.6.170.0200.04720.39
5.6.160.0130.07720.50
5.6.150.0070.07718.17
5.6.140.0070.04018.25
5.6.130.0070.08318.20
5.6.120.0100.08020.98
5.6.110.0000.06720.97
5.6.100.0000.04720.96
5.6.90.0000.04720.99
5.6.80.0170.07020.50
5.6.70.4530.04020.39
5.5.350.0130.07020.44
5.5.340.0070.08317.94
5.5.330.0070.05320.13
5.5.320.0530.05320.36
5.5.310.0300.04720.35
5.5.300.0100.04717.95
5.5.290.0070.07318.08
5.5.280.0070.08720.87
5.5.270.0170.05720.79
5.5.260.0070.08320.76
5.5.250.0030.08720.61
5.5.240.0100.07320.23
5.4.450.3300.03719.48
5.4.440.2870.04319.41
5.4.430.3170.03719.18
5.4.420.2930.04719.48
5.4.410.3230.04319.36
5.4.400.3030.03719.09
5.4.390.3170.03318.87
5.4.380.3070.04019.09
5.4.370.2770.03718.98
5.4.360.2800.03719.12
5.4.350.3500.03319.08
5.4.340.3130.04318.89
5.4.320.3230.04019.08
5.4.310.2970.03318.86
5.4.300.2970.03719.08
5.4.290.2870.04019.07
5.4.280.3000.03719.11
5.4.270.3100.04019.08
5.4.260.3130.03319.31
5.4.250.2770.04018.83
5.4.240.2700.03718.99
5.4.230.3130.04018.94
5.4.220.2970.03319.05
5.4.210.3500.04319.31
5.4.200.2800.03319.15
5.4.190.2770.03319.11
5.4.180.2730.03719.20
5.4.170.2930.04019.11
5.4.160.2670.04319.19
5.4.150.2970.03319.09
5.4.140.2630.03316.41
5.4.130.2930.03316.51
5.4.120.3170.04316.29
5.4.110.3000.03716.38
5.4.100.2970.04016.55
5.4.90.3070.03316.59
5.4.80.3070.04016.50
5.4.70.2770.03716.44
5.4.60.3100.03716.51
5.4.50.3030.04016.51
5.4.40.2900.03716.16
5.4.30.3070.03716.48
5.4.20.0530.06016.21
5.4.10.0070.07316.34
5.4.00.0100.06715.80
5.3.290.0570.05314.80
5.3.280.3270.03714.58
5.3.270.3170.04014.61
5.3.260.2900.04014.52
5.3.250.3100.04014.50
5.3.240.3200.03714.60
5.3.230.3000.03714.81
5.3.220.2930.04014.64
5.3.210.3170.04014.68
5.3.200.3100.04014.63
5.3.190.2930.04314.57
5.3.180.2970.03314.55
5.3.170.3000.03714.46
5.3.160.3270.04014.46
5.3.150.3230.03314.78
5.3.140.3100.04014.52
5.3.130.3230.03314.51
5.3.120.3130.04014.55
5.3.110.3230.03714.45
5.3.100.3030.03014.08
5.3.90.3230.03014.16
5.3.80.3200.03714.16
5.3.70.3200.03314.09
5.3.60.2670.03713.92
5.3.50.3170.04014.16
5.3.40.3200.03713.99
5.3.30.1630.03713.96
5.3.20.0070.06713.61
5.3.10.0200.05713.55
5.3.00.0030.05313.70
5.2.170.2830.04012.23
5.2.160.2600.03312.23
5.2.150.2370.03712.23
5.2.140.2630.03312.23
5.2.130.2500.03012.23
5.2.120.2330.03712.23
5.2.110.2600.03712.23
5.2.100.2230.03012.23
5.2.90.2600.02712.23
5.2.80.2630.03312.23
5.2.70.2530.03012.23
5.2.60.2570.03012.23
5.2.50.2670.03312.23
5.2.40.2130.03012.23
5.2.30.2030.02712.23
5.2.20.2330.02012.23
5.2.10.1930.02712.23
5.2.00.2000.03012.23
5.1.60.2130.02712.23
5.1.50.1900.03012.23
5.1.40.2300.02012.23
5.1.30.2200.02312.23
5.1.20.2130.02312.23
5.1.10.2170.02712.23
5.1.00.2330.02312.23
5.0.50.1100.02012.23
5.0.40.1000.02312.23
5.0.30.1300.03312.23
5.0.20.1270.02312.23
5.0.10.1230.02712.23
5.0.00.1100.02712.23
4.4.90.0970.01312.23
4.4.80.0970.01312.23
4.4.70.1200.02012.23
4.4.60.1130.02012.23
4.4.50.1130.01712.23
4.4.40.1000.02312.23
4.4.30.1170.01012.23
4.4.20.1170.02012.23
4.4.10.1100.02012.23
4.4.00.1230.02712.23
4.3.110.1100.01312.23
4.3.100.1170.01712.23
4.3.90.1130.01712.23
4.3.80.1070.02012.23
4.3.70.1130.01012.23
4.3.60.1230.02012.23
4.3.50.1100.01312.23
4.3.40.1170.03012.23
4.3.30.0630.02312.23
4.3.20.0630.01312.23
4.3.10.0570.02012.23
4.3.00.0470.01712.23

preferences:
52.84 ms | 401 KiB | 5 Q