3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arrs = array(); $arrs[] = array('something1', 2); $arrs[] = array('something3', 'something4'); $arrs[] = array(); $arrs[] = array('something1', 3.12); $list = array(); foreach($arrs as $key=>$arr) { if(is_array($arr)) { $list = array_merge($list, $arr); } else{ echo $key." not array"; } } print_r($list);

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.0040.01518.43
8.3.50.0100.00721.14
8.3.40.0160.00318.63
8.3.30.0130.00720.20
8.3.20.0000.00720.29
8.3.10.0070.00021.92
8.3.00.0040.01120.46
8.2.180.0090.01216.63
8.2.170.0040.01122.96
8.2.160.0100.00320.33
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0100.00326.16
8.2.120.0050.00319.66
8.2.110.0060.00619.27
8.2.100.0070.00417.97
8.2.90.0000.00819.23
8.2.80.0000.00817.97
8.2.70.0000.00817.63
8.2.60.0040.00417.79
8.2.50.0000.00818.10
8.2.40.0000.00818.21
8.2.30.0030.00718.19
8.2.20.0040.00417.78
8.2.10.0070.00017.80
8.2.00.0040.00417.62
8.1.280.0120.00925.92
8.1.270.0000.00724.66
8.1.260.0090.00026.35
8.1.250.0080.00028.09
8.1.240.0070.01121.37
8.1.230.0090.00317.89
8.1.220.0090.00017.91
8.1.210.0090.00018.77
8.1.200.0030.00617.35
8.1.190.0030.00617.22
8.1.180.0050.00318.10
8.1.170.0060.00318.54
8.1.160.0000.00722.27
8.1.150.0040.00418.54
8.1.140.0030.00617.37
8.1.130.0030.00317.84
8.1.120.0040.00417.38
8.1.110.0040.00417.52
8.1.100.0040.00417.48
8.1.90.0040.00417.45
8.1.80.0000.00817.36
8.1.70.0030.00317.45
8.1.60.0080.00017.64
8.1.50.0000.00817.53
8.1.40.0080.00017.41
8.1.30.0080.00017.66
8.1.20.0000.00817.67
8.1.10.0000.00817.32
8.1.00.0060.00317.41
8.0.300.0050.00318.77
8.0.290.0030.00616.60
8.0.280.0030.00318.45
8.0.270.0000.00817.26
8.0.260.0040.00416.82
8.0.250.0000.00716.98
8.0.240.0040.00416.98
8.0.230.0040.00416.97
8.0.220.0030.00316.85
8.0.210.0030.00516.77
8.0.200.0000.00616.90
8.0.190.0090.00016.96
8.0.180.0070.00016.82
8.0.170.0050.00316.93
8.0.160.0030.00416.79
8.0.150.0050.00216.84
8.0.140.0040.00416.85
8.0.130.0030.00313.27
8.0.120.0040.00416.89
8.0.110.0040.00416.86
8.0.100.0080.00016.97
8.0.90.0000.00717.01
8.0.80.0060.01516.85
8.0.70.0000.00716.94
8.0.60.0070.00016.79
8.0.50.0040.00416.78
8.0.30.0120.00816.97
8.0.20.0130.00617.40
8.0.10.0040.00416.81
8.0.00.0090.01116.71
7.4.330.0060.00015.08
7.4.320.0030.00316.64
7.4.300.0030.00316.59
7.4.290.0000.00616.59
7.4.280.0040.00416.57
7.4.270.0030.00316.56
7.4.260.0000.01016.60
7.4.250.0030.00616.46
7.4.240.0060.00116.48
7.4.230.0050.00216.35
7.4.220.0150.01116.52
7.4.210.0080.00716.54
7.4.200.0030.00316.26
7.4.190.0040.00416.57
7.4.160.0090.00616.43
7.4.150.0040.01417.40
7.4.140.0120.01017.86
7.4.130.0110.00716.54
7.4.120.0060.01016.56
7.4.110.0120.00616.48
7.4.100.0120.01216.66
7.4.90.0170.00016.66
7.4.80.0070.01019.39
7.4.70.0030.01316.49
7.4.60.0070.01016.33
7.4.50.0050.00016.17
7.4.40.0150.00422.77
7.4.30.0140.00316.41
7.4.00.0000.01415.03
7.3.330.0020.00212.98
7.3.320.0000.00513.17
7.3.310.0060.00316.33
7.3.300.0030.00316.11
7.3.290.0140.00016.28
7.3.280.0040.01216.25
7.3.270.0060.01117.40
7.3.260.0120.01216.47
7.3.250.0080.01116.43
7.3.240.0130.00316.66
7.3.230.0080.00816.40
7.3.210.0090.00916.27
7.3.200.0060.01219.39
7.3.190.0070.01516.48
7.3.180.0030.01216.52
7.3.170.0140.00316.43
7.3.160.0060.01016.51
7.3.120.0110.00314.93
7.2.330.0080.00816.41
7.2.320.0000.02216.79
7.2.310.0060.01316.76
7.2.300.0100.00616.80
7.2.290.0030.01316.68
7.2.60.0130.00317.08
7.1.200.0080.00415.79
7.1.100.0060.00617.91
7.1.70.0000.00716.95
7.1.60.0140.01019.21
7.1.50.0040.01816.95
7.1.00.0100.06322.39
7.0.200.0800.00314.76
7.0.140.0070.07021.95
7.0.60.0100.08719.97
7.0.50.0100.06717.86
7.0.40.0100.08320.11
7.0.30.0300.08320.19
7.0.20.0200.05720.08
7.0.10.0030.06320.08
7.0.00.0100.06020.11
5.6.280.0030.07320.91
5.6.210.0030.04020.50
5.6.200.0100.05318.16
5.6.190.0070.04020.41
5.6.180.0230.08020.55
5.6.170.0230.04720.52
5.6.160.0070.03720.71
5.6.150.0070.08018.21
5.6.140.0070.04018.24
5.6.130.0030.04718.17
5.6.120.0130.06721.04
5.6.110.0200.07021.11
5.6.100.0100.08021.14
5.6.90.0070.04020.99
5.6.80.0130.07720.38
5.6.70.4170.03720.39
5.5.350.0300.07720.49
5.5.340.0030.04018.03
5.5.330.0130.07720.56
5.5.320.0230.04320.30
5.5.310.0270.06720.34
5.5.300.0070.07317.95
5.5.290.0100.08018.08
5.5.280.0130.04320.73
5.5.270.0170.06320.93
5.5.260.0100.07720.76
5.5.250.0030.08020.54
5.5.240.0170.04020.26
5.4.450.0800.05719.61
5.4.440.0930.05719.46
5.4.430.0830.06319.65
5.4.420.0700.06019.66
5.4.410.0130.07318.72
5.4.400.0830.07718.75
5.4.390.3130.06718.59
5.4.380.0270.05318.68
5.4.370.0400.04718.76
5.4.360.0230.05318.58
5.4.350.0080.03512.00
5.4.340.0050.04012.00
5.4.320.0030.04312.49
5.4.310.0080.03712.48
5.4.300.0080.04212.49
5.4.290.0060.04712.48
5.4.280.0060.03512.36
5.4.270.0030.03912.36
5.4.260.0060.03712.36
5.4.250.0050.03812.35
5.4.240.0070.03512.36
5.4.230.0080.03712.35
5.4.220.0040.03712.35
5.4.210.0070.03512.35
5.4.200.0080.03712.35
5.4.190.0060.03712.34
5.4.180.0050.03812.34
5.4.170.0130.02912.36
5.4.160.0050.03712.35
5.4.150.0070.03712.34
5.4.140.0110.03312.03
5.4.130.0030.04212.02
5.4.120.0040.03811.98
5.4.110.0050.03911.97
5.4.100.0040.03611.98
5.4.90.0090.03311.97
5.4.80.0080.04011.97
5.4.70.0070.03711.97
5.4.60.0070.03411.97
5.4.50.0060.03611.96
5.4.40.0050.03611.96
5.4.30.0070.03411.95
5.4.20.0060.03611.95
5.4.10.0060.03611.95
5.4.00.0070.03711.44
5.3.290.0030.04212.80
5.3.280.0040.04012.71
5.3.270.0020.04312.73
5.3.260.0080.03712.72
5.3.250.0090.03512.72
5.3.240.0050.03912.72
5.3.230.0050.04012.71
5.3.220.0070.03712.68
5.3.210.0060.03912.68
5.3.200.0100.03312.68
5.3.190.0050.03812.68
5.3.180.0020.04012.68
5.3.170.0060.03712.67
5.3.160.0070.04012.67
5.3.150.0110.03312.67
5.3.140.0090.03412.66
5.3.130.0070.04012.66
5.3.120.0070.04012.66
5.3.110.0090.03812.66
5.3.100.0070.03712.11
5.3.90.0050.03912.08
5.3.80.0100.04112.07
5.3.70.0090.04012.07
5.3.60.0060.03812.06
5.3.50.0070.04012.00
5.3.40.0090.03412.00
5.3.30.0050.03711.96
5.3.20.0070.03511.74
5.3.10.0050.03711.70
5.3.00.0080.04211.69
5.2.170.0050.0329.18
5.2.160.0010.0369.18
5.2.150.0040.0329.18
5.2.140.0040.0319.18
5.2.130.0050.0309.14
5.2.120.0050.0309.14
5.2.110.0050.0319.15
5.2.100.0050.0399.15
5.2.90.0050.0349.15
5.2.80.0080.0309.15
5.2.70.0060.0309.14
5.2.60.0100.0309.09
5.2.50.0080.0289.06
5.2.40.0040.0309.04
5.2.30.0060.0299.02
5.2.20.0040.0299.00
5.2.10.0040.0378.94
5.2.00.0030.0358.80
5.1.60.0030.0258.09
5.1.50.0050.0248.09
5.1.40.0040.0258.07
5.1.30.0060.0268.41
5.1.20.0070.0248.44
5.1.10.0040.0278.17
5.1.00.0030.0278.16
5.0.50.0050.0206.64
5.0.40.0030.0196.50
5.0.30.0030.0316.31
5.0.20.0050.0176.30
5.0.10.0040.0196.27
5.0.00.0050.0316.26
4.4.90.0020.0174.78
4.4.80.0030.0154.75
4.4.70.0010.0184.76
4.4.60.0040.0144.76
4.4.50.0040.0144.77
4.4.40.0030.0254.71
4.4.30.0070.0114.75
4.4.20.0050.0164.84
4.4.10.0040.0184.85
4.4.00.0050.0244.76
4.3.110.0040.0154.67
4.3.100.0030.0144.66
4.3.90.0030.0144.64
4.3.80.0040.0244.59
4.3.70.0040.0134.63
4.3.60.0040.0134.63
4.3.50.0050.0134.63
4.3.40.0040.0234.54
4.3.30.0030.0153.32
4.3.20.0010.0183.30
4.3.10.0030.0153.27
4.3.00.0130.0206.88

preferences:
43.96 ms | 401 KiB | 5 Q