3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = Array ( 0 => Array ( 0 => 'Red', 1 => 'Steel' ), 1 => Array ( 0 => 'Red', 1 => 'Wood' ) , 2 => Array ( 0 => 'Blue', 1 => 'Wood' ) ); $colors = array_count_values(array_column($arr, 0)); $materials = array_count_values(array_column($arr, 1)); print_r($colors);print_r($materials);

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.0120.00318.30
8.3.50.0060.01222.87
8.3.40.0070.00718.76
8.3.30.0140.00018.95
8.3.20.0070.00020.21
8.3.10.0070.00023.66
8.3.00.0040.00417.55
8.2.180.0090.00916.32
8.2.170.0070.00722.96
8.2.160.0090.00420.53
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0050.00318.77
8.2.110.0090.00922.19
8.2.100.0120.00017.59
8.2.90.0080.00018.09
8.2.80.0050.00317.97
8.2.70.0000.00817.80
8.2.60.0000.00818.22
8.2.50.0000.00818.10
8.2.40.0000.00822.36
8.2.30.0040.00419.12
8.2.20.0000.00817.50
8.2.10.0020.00518.09
8.2.00.0060.00317.73
8.1.280.0070.00725.92
8.1.270.0050.00322.19
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00322.38
8.1.230.0080.00420.74
8.1.220.0050.00217.74
8.1.210.0090.00018.77
8.1.200.0000.00917.25
8.1.190.0000.00917.10
8.1.180.0000.00718.10
8.1.170.0000.00918.97
8.1.160.0070.00018.71
8.1.150.0030.00320.04
8.1.140.0070.00017.35
8.1.130.0000.00717.74
8.1.120.0000.00817.25
8.1.110.0000.00817.48
8.1.100.0000.00717.45
8.1.90.0050.00317.40
8.1.80.0040.00417.39
8.1.70.0030.00317.32
8.1.60.0030.00517.44
8.1.50.0000.00817.36
8.1.40.0000.00817.49
8.1.30.0000.00817.53
8.1.20.0050.00317.43
8.1.10.0020.00517.39
8.1.00.0050.00317.28
8.0.300.0000.00819.97
8.0.290.0060.00316.58
8.0.280.0030.00318.45
8.0.270.0030.00317.09
8.0.260.0030.00317.11
8.0.250.0000.00716.89
8.0.240.0040.00416.79
8.0.230.0000.00716.88
8.0.220.0030.00316.74
8.0.210.0000.00716.85
8.0.200.0000.00816.88
8.0.190.0000.00716.86
8.0.180.0000.00716.87
8.0.170.0000.00816.92
8.0.160.0030.00316.77
8.0.150.0030.00316.67
8.0.140.0050.00316.75
8.0.130.0030.00313.28
8.0.120.0030.00516.78
8.0.110.0080.00016.70
8.0.100.0000.00816.70
8.0.90.0070.00016.89
8.0.80.0140.00616.79
8.0.70.0040.00316.61
8.0.60.0000.00816.70
8.0.50.0040.00416.73
8.0.30.0100.01016.94
8.0.20.0070.01217.40
8.0.10.0040.00416.82
8.0.00.0130.00316.66
7.4.330.0050.00015.02
7.4.320.0000.00616.55
7.4.300.0060.00016.49
7.4.290.0030.00316.46
7.4.280.0040.00416.45
7.4.270.0000.00716.59
7.4.260.0030.00316.45
7.4.250.0000.00816.31
7.4.240.0020.00516.41
7.4.230.0000.00716.38
7.4.220.0110.00716.46
7.4.210.0030.01116.58
7.4.200.0000.00716.35
7.4.160.0110.00816.50
7.4.150.0140.00717.40
7.4.140.0070.01017.86
7.4.130.0070.01116.28
7.4.120.0110.00816.37
7.4.110.0060.01016.22
7.4.100.0120.01216.40
7.4.90.0000.01816.30
7.4.80.0130.00319.39
7.4.70.0100.01416.49
7.4.60.0120.00616.22
7.4.50.0000.00416.16
7.4.40.0090.00916.41
7.4.30.0090.01216.37
7.4.00.0030.01414.84
7.3.330.0060.00013.05
7.3.320.0000.00512.90
7.3.310.0070.00016.27
7.3.300.0040.00416.01
7.3.290.0130.00616.10
7.3.280.0100.00716.15
7.3.270.0140.00317.40
7.3.260.0140.00616.02
7.3.250.0120.00816.09
7.3.240.0140.00716.13
7.3.230.0060.01016.39
7.3.210.0030.01316.07
7.3.200.0090.01119.39
7.3.190.0120.00916.12
7.3.180.0090.00616.35
7.3.170.0070.01016.27
7.3.160.0030.01716.34
7.3.120.0070.01114.50
7.2.330.0130.00416.54
7.2.320.0090.00916.35
7.2.310.0030.01516.48
7.2.300.0030.01316.45
7.2.290.0080.00816.58
7.2.110.0190.00816.64
7.2.100.0090.01916.27
7.2.90.0390.01016.56
7.2.80.0050.02116.59
7.2.70.0360.01216.92
7.2.60.0140.00816.84
7.2.50.0330.00816.81
7.2.40.0120.01216.66
7.2.30.0250.01016.51
7.2.20.0280.00816.49
7.2.10.0360.01016.46
7.2.00.0320.00916.74
7.1.230.1290.01015.61
7.1.220.2080.01015.70
7.1.210.0160.00815.82
7.1.200.0120.00815.65
7.1.190.0170.00815.57
7.1.180.0140.01115.62
7.1.170.0300.00415.48
7.1.160.0190.00415.79
7.1.150.0250.00415.49
7.1.140.0360.00915.38
7.1.130.0360.00315.61
7.1.120.0360.00515.27
7.1.110.0360.00615.73
7.1.100.0240.00616.91
7.1.90.0220.00915.43
7.1.80.0450.00915.80
7.1.70.0130.00916.29
7.1.60.0140.01317.70
7.1.50.0220.01116.41
7.1.40.0590.01015.86
7.1.30.0210.00815.91
7.1.20.0580.01715.82
7.1.10.0110.01515.79
7.1.00.0090.04419.09
7.0.310.0400.00415.32
7.0.300.0130.01115.08
7.0.290.0200.01415.21
7.0.280.0310.01215.06
7.0.270.0380.00315.39
7.0.260.0300.00915.24
7.0.250.0110.01115.16
7.0.240.0400.00315.31
7.0.230.0350.01015.32
7.0.220.0120.00815.11
7.0.210.0300.00614.98
7.0.200.0100.00715.90
7.0.190.0150.01115.31
7.0.180.0130.00815.23
7.0.170.0230.00215.32
7.0.160.0130.01115.06
7.0.150.0250.00815.29
7.0.140.0140.03618.67
7.0.130.0170.00715.43
7.0.120.0150.00815.52
7.0.110.0180.00415.41
7.0.100.0170.00715.11
7.0.90.0150.00915.04
7.0.80.0070.01315.40
7.0.70.0000.02315.34
7.0.60.0130.04317.65
7.0.50.0130.03816.52
7.0.40.0080.02716.71
7.0.30.0210.02116.83
7.0.20.0200.03916.55
7.0.10.0150.04216.75
7.0.00.0090.03416.58
5.6.380.0200.00714.53
5.6.370.0160.01013.72
5.6.360.0090.01214.30
5.6.350.0290.00413.94
5.6.340.0320.01714.20
5.6.330.0230.01013.91
5.6.320.0300.00813.83
5.6.310.0210.00614.32
5.6.300.0110.01614.00
5.6.290.0180.00513.98
5.6.280.0170.03617.63
5.6.270.0110.00914.38
5.6.260.0140.00714.54
5.6.250.0110.01514.12
5.6.240.0150.00514.37
5.6.230.0110.01114.38
5.6.220.0140.00914.25
5.6.210.0110.04417.36
5.6.200.0110.03916.16
5.6.190.0110.03317.37
5.6.180.0100.03417.30
5.6.170.0190.04517.14
5.6.160.0090.05017.46
5.6.150.0130.04416.21
5.6.140.0160.04216.11
5.6.130.0110.02515.99
5.6.120.0120.04717.53
5.6.110.0140.02717.51
5.6.100.0130.02517.60
5.6.90.0100.03717.54
5.6.80.0190.03717.29
5.6.70.0120.00714.18
5.6.60.0180.00413.96
5.6.50.0190.00314.09
5.6.40.0090.01314.21
5.6.30.0160.00614.35
5.6.20.0200.00314.14
5.6.10.0130.01313.96
5.6.00.0070.01514.09
5.5.380.0110.00310.79
5.5.370.0120.00010.84
5.5.360.0130.00310.66
5.5.350.0070.02815.70
5.5.340.0120.04014.45
5.5.330.0060.02415.39
5.5.320.0240.02715.52
5.5.310.0170.03715.58
5.5.300.0030.02314.51
5.5.290.0130.02314.43
5.5.280.0070.03815.97
5.5.270.0090.02015.79
5.5.260.0100.04215.93
5.5.250.0160.03215.77
5.5.240.0200.03715.52
5.5.230.0050.00810.64
5.5.220.0080.00810.86
5.5.210.0130.00010.79
5.5.200.0100.00510.91
5.5.190.0120.00410.62
5.5.180.0090.00910.98
5.5.170.0150.00614.21
5.5.160.0080.01110.83
5.5.150.0110.00310.84
5.5.140.0130.00410.73
5.5.130.0150.00010.83
5.5.120.0050.01011.07
5.5.110.0090.00510.98
5.5.100.0110.00410.99
5.5.90.0000.01311.07
5.5.80.0110.00410.68
5.5.70.0100.00310.82
5.5.60.0100.00610.54
5.5.50.0030.01311.01
5.5.40.0100.00310.95
5.5.30.0090.00510.74
5.5.20.0050.01110.80
5.5.10.0090.00510.41
5.5.00.0080.00510.84
5.4.450.0200.02815.15
5.4.440.0230.02814.87
5.4.430.0180.03415.01
5.4.420.0210.02215.23
5.4.410.0360.02015.04
5.4.400.0240.02114.88
5.4.390.0330.02215.01
5.4.380.0430.03214.58
5.4.370.0550.02114.54
5.4.360.0510.03214.72
5.4.350.0440.03314.65
5.4.340.0460.03314.79
5.4.330.0130.00310.88
5.4.320.0070.02311.60
5.4.310.0050.02311.63
5.4.300.0090.02011.59
5.4.290.0060.02911.58
5.4.280.0090.02111.66
5.4.270.0080.02211.71
5.4.260.0050.02511.63
5.4.250.0060.02111.58
5.4.240.0080.02211.61
5.4.230.0070.02111.52
5.4.220.0050.02311.58
5.4.210.0060.02011.51
5.4.200.0090.02111.59
5.4.190.0080.02211.40
5.4.180.0110.01811.53
5.4.170.0060.02411.64
5.4.160.0080.01911.42
5.4.150.0050.02411.61
5.4.140.0060.02311.53
5.4.130.0070.02011.31
5.4.120.0050.02311.30
5.4.110.0090.01911.42
5.4.100.0090.01711.37
5.4.90.0070.02011.44
5.4.80.0070.02211.35
5.4.70.0100.01811.33
5.4.60.0110.02311.22
5.4.50.0090.02011.25
5.4.40.0070.02111.40
5.4.30.0110.02011.27
5.4.20.0110.02111.25
5.4.10.0130.01611.43
5.4.00.0120.02111.03
5.3.290.0090.02311.59
5.3.280.0090.01911.55
5.3.270.0070.02311.55
5.3.260.0080.02111.55
5.3.250.0100.02011.55
5.3.240.0070.02111.55
5.3.230.0070.02111.54
5.3.220.0100.02111.54
5.3.210.0090.02011.53
5.3.200.0050.02311.53
5.3.190.0080.02211.53
5.3.180.0060.02211.58
5.3.170.0080.02011.60
5.3.160.0100.01911.58
5.3.150.0060.02211.55
5.3.140.0090.01811.52
5.3.130.0060.02211.57
5.3.120.0070.02111.63
5.3.110.0080.02411.54
5.3.100.0110.02011.26
5.3.90.0120.01911.23
5.3.80.0130.02011.23
5.3.70.0130.02311.23
5.3.60.0090.01911.23
5.3.50.0160.02111.19
5.3.40.0110.02511.19
5.3.30.0100.02211.17
5.3.20.0050.02211.05
5.3.10.0130.01811.04
5.3.00.0150.02111.03
5.2.170.0080.0209.78
5.2.160.0070.0189.78
5.2.150.0050.0209.78
5.2.140.0090.0179.78
5.2.130.0080.0199.76
5.2.120.0050.0209.76
5.2.110.0030.0239.76
5.2.100.0070.0209.76
5.2.90.0090.0189.76
5.2.80.0060.0229.76
5.2.70.0090.0179.76
5.2.60.0070.0179.74
5.2.50.0090.0179.72
5.2.40.0070.0209.71
5.2.30.0050.0199.70
5.2.20.0110.0139.69
5.2.10.0080.0159.65
5.2.00.0120.0169.58
5.1.60.0090.0149.22
5.1.50.0090.0159.22
5.1.40.0080.0129.21
5.1.30.0110.0179.39
5.1.20.0070.0169.40
5.1.10.0060.0149.26
5.1.00.0070.0179.26
5.0.50.0090.0108.50
5.0.40.0020.0148.43
5.0.30.0070.0208.34
5.0.20.0050.0098.32
5.0.10.0010.0158.31
5.0.00.0040.0178.31
4.4.90.0050.0097.58
4.4.80.0040.0097.57
4.4.70.0040.0117.57
4.4.60.0030.0117.57
4.4.50.0090.0097.58
4.4.40.0070.0137.55
4.4.30.0060.0097.57
4.4.20.0080.0077.62
4.4.10.0020.0127.62
4.4.00.0030.0167.57
4.3.110.0050.0107.53
4.3.100.0050.0147.52
4.3.90.0040.0117.51
4.3.80.0040.0157.48
4.3.70.0020.0107.50
4.3.60.0050.0077.51
4.3.50.0010.0127.51
4.3.40.0040.0157.46
4.3.30.0040.0146.83
4.3.20.0010.0126.82
4.3.10.0010.0116.80
4.3.00.0030.01112.78

preferences:
45.03 ms | 400 KiB | 5 Q