3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arrays = [ 51 => [ 5 => "", 2 => "", 8 => "" ], 78 => [ 18 => "", 23 => "2", 21 => "2" ], 8 => [ 18 => "test", 23 => 5, 21 => "" ] ]; $result = array_reduce($arrays, function($carry, $item) { $carry = array_merge($carry, $item); return $carry; }, []); if (count(array_filter($result)) === 0) { echo "array contains only empty values"; }

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.4.120.0080.01120.77
8.4.110.0060.00922.51
8.4.100.0130.00917.52
8.4.90.0070.00622.52
8.4.80.0060.00417.46
8.4.70.0120.00717.83
8.4.60.0130.00718.41
8.4.50.0110.01018.77
8.4.40.0080.00417.63
8.4.30.0060.01319.68
8.4.20.0030.00619.41
8.4.10.0100.01018.71
8.3.250.0090.00820.86
8.3.240.0120.00716.29
8.3.230.0120.00716.54
8.3.220.0030.00519.00
8.3.210.0040.00316.66
8.3.200.0070.00416.53
8.3.190.0100.01317.09
8.3.180.0090.01018.65
8.3.170.0060.01317.03
8.3.160.0100.01018.05
8.3.150.0070.01316.74
8.3.140.0060.00316.57
8.3.130.0040.00418.36
8.3.120.0080.00320.48
8.3.110.0030.00616.75
8.3.100.0070.00018.18
8.3.90.0110.00726.77
8.3.80.0070.00317.97
8.3.70.0200.00316.25
8.3.60.0090.00618.43
8.3.50.0140.00317.90
8.3.40.0090.00918.52
8.3.30.0070.00718.71
8.3.20.0050.00219.16
8.3.10.0050.00320.73
8.3.00.0080.00019.68
8.2.290.0070.00322.10
8.2.280.0140.00720.20
8.2.270.0060.01218.28
8.2.260.0060.00316.96
8.2.250.0080.00018.37
8.2.240.0100.00316.88
8.2.230.0060.00320.94
8.2.220.0060.00324.06
8.2.210.0070.00026.77
8.2.200.0000.01116.38
8.2.190.0090.00616.58
8.2.180.0110.01516.50
8.2.170.0070.01422.96
8.2.160.0100.00318.96
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00720.91
8.2.110.0070.00320.53
8.2.100.0070.00417.72
8.2.90.0040.00417.63
8.2.80.0050.00318.58
8.2.70.0000.00818.04
8.2.60.0080.00018.03
8.2.50.0000.00818.10
8.2.40.0090.00021.16
8.2.30.0040.00419.42
8.2.20.0080.00017.96
8.2.10.0050.00218.02
8.2.00.0000.00721.20
8.1.330.0110.00621.98
8.1.320.0160.00517.69
8.1.310.0030.01018.36
8.1.300.0090.00418.09
8.1.290.0030.00718.88
8.1.280.0140.00325.92
8.1.270.0000.00820.11
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0120.00620.22
8.1.230.0080.00420.97
8.1.220.0000.00818.70
8.1.210.0000.00818.77
8.1.200.0040.00417.36
8.1.190.0000.00817.23
8.1.180.0030.00518.10
8.1.170.0030.00618.52
8.1.160.0000.00818.74
8.1.150.0040.00418.90
8.1.140.0040.00417.75
8.1.130.0040.00419.24
8.1.120.0050.00517.49
8.1.110.0030.00617.51
8.1.100.0030.00517.38
8.1.90.0040.00817.42
8.1.80.0120.00017.36
8.1.70.0080.00417.44
8.1.60.0080.00417.54
8.1.50.0020.01217.53
8.1.40.0070.00717.42
8.1.30.0110.00417.50
8.1.20.0060.00817.59
8.1.10.0060.00817.50
8.1.00.0090.00417.33
8.0.300.0040.00418.77
8.0.290.0070.00016.58
8.0.280.0000.00718.33
8.0.270.0040.00417.22
8.0.260.0000.00718.59
8.0.250.0000.00716.93
8.0.240.0040.00416.94
8.0.230.0010.00616.80
8.0.220.0070.00416.75
8.0.210.0020.01016.70
8.0.200.0070.00516.85
8.0.190.0090.00316.83
8.0.180.0050.00816.88
8.0.170.0070.00516.89
8.0.160.0110.00016.79
8.0.150.0110.00216.76
8.0.140.0080.00516.81
8.0.130.0110.00014.99
8.0.120.0030.00916.82
8.0.110.0060.00516.81
8.0.100.0040.00716.85
8.0.90.0050.00716.88
8.0.80.0080.01016.88
8.0.70.0110.00116.77
8.0.60.0120.00016.80
8.0.50.0070.00516.79
8.0.30.0080.00916.95
8.0.20.0130.00617.27
8.0.10.0100.00216.91
8.0.00.0090.00716.74
7.4.330.0020.00215.55
7.4.320.0030.00616.59
7.4.300.0030.00516.51
7.4.290.0080.00516.49
7.4.280.0090.00516.48
7.4.270.0070.00516.37
7.4.260.0110.00216.51
7.4.250.0040.00716.42
7.4.240.0130.00016.57
7.4.230.0070.00516.56
7.4.220.0080.00316.54
7.4.210.0110.00617.09
7.4.200.0090.00616.55
7.4.190.0100.00616.64
7.4.180.0090.00616.63
7.4.160.0090.00716.52
7.4.150.0110.00616.30
7.4.140.0100.00917.57
7.4.130.0090.01016.39
7.4.120.0120.00516.47
7.4.110.0140.00416.41
7.4.100.0130.00316.51
7.4.90.0140.00416.42
7.4.80.0080.01117.39
7.4.70.0070.01016.27
7.4.60.0090.00716.38
7.4.50.0090.00916.33
7.4.40.0100.00716.32
7.4.30.0080.00616.20
7.4.20.0060.00716.30
7.4.10.0090.00916.33
7.4.00.0040.01115.54
7.3.330.0050.00514.70
7.3.320.0090.00314.75
7.3.310.0060.00716.15
7.3.300.0050.00616.22
7.3.290.0050.00616.24
7.3.280.0090.00616.23
7.3.270.0170.00016.18
7.3.260.0100.00816.23
7.3.250.0120.00416.31
7.3.240.0090.00716.29
7.3.230.0120.00516.25
7.3.220.0070.00715.98
7.3.210.0100.00616.18
7.3.200.0090.00816.27
7.3.190.0100.00716.21
7.3.180.0120.00616.31
7.3.170.0080.00816.24
7.3.160.0090.01016.21
7.3.150.0120.00515.99
7.3.140.0140.00416.15
7.3.130.0120.00616.09
7.3.120.0120.00515.40
7.3.110.0100.00715.41
7.3.100.0070.00915.44
7.3.90.0070.00815.44
7.3.80.0100.00715.29
7.3.70.0110.00515.38
7.3.60.0060.01115.38
7.3.50.0100.00715.24
7.3.40.0090.00815.29
7.3.30.0080.00815.20
7.3.20.0100.00816.78
7.3.10.0070.00816.88
7.3.00.0100.00516.76
7.2.340.0100.00516.37
7.2.330.0080.00816.36
7.2.320.0100.00616.52
7.2.310.0100.01116.50
7.2.300.0070.01016.49
7.2.290.0100.00916.46
7.2.280.0120.00416.36
7.2.270.0140.00616.47
7.2.260.0120.00516.41
7.2.250.0100.00515.66
7.2.240.0070.01215.54
7.2.230.0050.01015.72
7.2.220.0090.00715.53
7.2.210.0080.00915.46
7.2.200.0070.01215.40
7.2.190.0050.01015.47
7.2.180.0070.00915.47
7.2.170.0070.00915.56
7.2.160.0080.00915.78
7.2.150.0100.00916.99
7.2.140.0080.01017.12
7.2.130.0050.01117.02
7.2.120.0090.00817.11
7.2.110.0090.00917.18
7.2.100.0110.00617.09
7.2.90.0100.00617.06
7.2.80.0130.00717.10
7.2.70.0090.01116.71
7.2.60.0360.00616.07
7.2.50.0370.00716.02
7.2.40.0290.01016.30
7.2.30.1110.01016.29
7.2.20.0390.00816.30
7.2.10.0330.00816.26
7.2.00.0320.01016.34
7.1.330.0100.00515.91
7.1.320.0080.00715.98
7.1.310.0080.00715.84
7.1.300.0130.00515.97
7.1.290.0070.00715.93
7.1.280.0070.00715.84
7.1.270.0100.00616.01
7.1.260.0050.00915.98
7.1.250.0080.00715.99
7.1.240.0120.00516.09
7.1.230.0110.00616.01
7.1.220.0090.00715.97
7.1.210.0040.01016.10
7.1.200.0070.00715.95
7.1.190.0090.00915.54
7.1.180.0080.00915.64
7.1.170.0340.00814.94
7.1.160.1070.00915.91
7.1.150.1090.01015.97
7.1.140.0330.00815.97
7.1.130.0500.00715.85
7.1.120.0280.00815.87
7.1.110.0270.00815.68
7.1.100.0260.01015.71
7.1.90.0520.00815.60
7.1.80.0930.00915.79
7.1.70.0350.00615.30
7.1.60.1330.01021.30
7.1.50.1340.01221.27
7.1.40.1110.01021.19
7.1.30.0950.00820.19
7.1.20.1090.00921.13
7.1.10.1270.00815.22
7.1.00.1330.01215.14
7.0.330.0090.00715.80
7.0.320.0110.00715.74
7.0.310.0080.01115.73
7.0.300.0110.00915.21
7.0.290.0140.00515.09
7.0.280.0130.00715.07
7.0.270.0120.00815.30
7.0.260.0090.00915.00
7.0.250.0150.00615.33
7.0.240.0150.00415.20
7.0.230.0120.00715.18
7.0.220.0120.00915.21
7.0.210.0110.00815.22
7.0.200.0140.00515.02
7.0.190.0110.00815.08
7.0.180.0140.00515.11
7.0.170.0140.00915.15
7.0.160.0150.00515.09
7.0.150.0150.01115.13
7.0.140.0130.00615.21
7.0.130.0140.00715.18
7.0.120.0180.00915.14
7.0.110.0120.00815.13
7.0.100.0160.00515.28
7.0.90.0150.00615.15
7.0.80.0140.00615.24
7.0.70.0110.00815.13
7.0.60.0120.00915.16
7.0.50.0130.00715.28
7.0.40.0150.00515.12
7.0.30.0100.00815.25
7.0.20.0130.00915.06
7.0.10.0140.00515.14
7.0.00.0150.00715.12
5.6.400.0100.00715.25
5.6.390.0120.00815.33
5.6.380.0130.00415.28
5.6.370.0080.01015.19
5.6.360.0060.01415.13
5.6.350.0120.00914.96
5.6.340.0130.01015.18
5.6.330.0120.01015.26
5.6.320.0120.00815.05
5.6.310.0100.00815.33
5.6.300.0170.02517.37
5.6.290.0150.03317.38
5.6.280.0140.03317.55
5.6.270.0190.03117.42
5.6.260.0130.03317.45
5.6.250.0160.03317.50
5.6.240.0180.03017.53
5.6.230.0130.03317.52
5.6.220.0110.03217.46
5.6.210.0160.03417.50
5.6.200.0180.03017.47
5.6.190.0190.03217.45
5.6.180.0160.03317.51
5.6.170.0130.03317.49
5.6.160.0150.03817.59
5.6.150.0140.02917.50
5.6.140.0140.03317.43
5.6.130.0120.03017.46
5.6.120.0170.03017.43
5.6.110.0150.02917.42
5.6.100.0140.03117.39
5.6.90.0110.03317.38
5.6.80.0160.03417.16
5.6.70.0140.03117.18
5.6.60.0160.03217.11
5.6.50.0190.02917.10
5.6.40.0150.03117.16
5.6.30.0150.03617.18
5.6.20.0100.03317.09
5.6.10.0150.03217.18
5.6.00.0140.03117.13

preferences:
31.05 ms | 403 KiB | 5 Q