3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( Array('weight' => '317.51474856007','reps' => '10'), Array('weight' => 50,'reps' => 10), Array('reps' => 10), Array('reps' => 10) ); $count = array(); array_walk_recursive($arr, function($v, $k){if(array_key_exists($k, $count))$count[$k]++;else $count[$k]=1;}, $count); print_r($count);

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.01516.75
8.3.50.0130.00722.74
8.3.40.0150.00020.58
8.3.30.0030.01019.22
8.3.20.0040.00420.18
8.3.10.0040.00423.53
8.3.00.0040.00417.63
8.2.180.0080.00816.75
8.2.170.0140.00022.96
8.2.160.0110.00420.39
8.2.150.0060.00324.18
8.2.140.0050.00324.66
8.2.130.0110.00826.16
8.2.120.0040.00420.94
8.2.110.0060.00320.97
8.2.100.0040.00717.91
8.2.90.0030.00617.75
8.2.80.0050.00317.97
8.2.70.0000.00817.93
8.2.60.0080.00018.22
8.2.50.0080.00018.10
8.2.40.0040.00418.21
8.2.30.0000.00718.18
8.2.20.0080.00017.85
8.2.10.0000.00818.17
8.2.00.0040.00417.68
8.1.280.0140.00725.92
8.1.270.0000.00824.02
8.1.260.0080.00026.35
8.1.250.0050.00228.09
8.1.240.0030.00619.21
8.1.230.0090.00321.04
8.1.220.0050.00317.79
8.1.210.0080.00018.77
8.1.200.0030.00617.35
8.1.190.0060.00317.22
8.1.180.0030.00618.10
8.1.170.0040.00418.65
8.1.160.0040.00422.04
8.1.150.0020.00518.90
8.1.140.0000.00817.38
8.1.130.0030.00317.76
8.1.120.0070.00017.49
8.1.110.0000.00717.43
8.1.100.0040.00417.48
8.1.90.0000.00717.38
8.1.80.0080.00017.37
8.1.70.0040.00417.42
8.1.60.0040.00417.60
8.1.50.0000.00817.57
8.1.40.0030.00517.52
8.1.30.0050.00317.60
8.1.20.0030.00617.60
8.1.10.0040.00417.58
8.1.00.0060.00317.39
8.0.300.0000.00719.77
8.0.290.0100.00016.58
8.0.280.0000.00818.39
8.0.270.0000.00717.09
8.0.260.0000.00717.13
8.0.250.0030.00316.87
8.0.240.0070.00016.84
8.0.230.0000.00816.94
8.0.220.0040.00416.86
8.0.210.0030.00316.91
8.0.200.0060.00017.08
8.0.190.0040.00417.05
8.0.180.0070.00016.89
8.0.170.0000.00816.85
8.0.160.0040.00316.93
8.0.150.0030.00516.93
8.0.140.0020.00516.89
8.0.130.0000.00613.39
8.0.120.0000.00716.87
8.0.110.0050.00216.96
8.0.100.0050.00216.85
8.0.90.0000.00717.03
8.0.80.0080.00717.01
8.0.70.0000.00717.02
8.0.60.0100.00016.86
8.0.50.0000.00716.98
8.0.30.0130.01016.93
8.0.20.0100.01217.42
8.0.10.0040.00416.90
8.0.00.0110.00716.74
7.4.330.0030.00315.00
7.4.320.0000.00616.61
7.4.300.0060.00016.42
7.4.290.0030.00316.50
7.4.280.0040.00416.60
7.4.270.0070.00016.56
7.4.260.0000.00716.62
7.4.250.0000.00716.48
7.4.240.0020.00516.45
7.4.230.0030.00316.50
7.4.220.0110.00716.54
7.4.210.0020.01216.48
7.4.200.0000.00716.48
7.4.160.0090.00616.59
7.4.150.0080.01117.40
7.4.140.0110.00917.86
7.4.130.0090.01416.50
7.4.120.0080.01116.51
7.4.110.0170.00616.39
7.4.100.0100.00616.29
7.4.90.0100.00716.71
7.4.80.0140.00319.39
7.4.70.0150.00616.65
7.4.60.0060.01116.57
7.4.50.0000.00416.64
7.4.40.0060.01416.52
7.4.30.0100.00616.52
7.4.00.0090.00414.94
7.3.330.0000.00713.27
7.3.320.0050.00013.23
7.3.310.0080.00016.47
7.3.300.0030.00316.36
7.3.290.0040.01416.44
7.3.280.0030.01416.41
7.3.270.0130.01017.40
7.3.260.0090.00916.40
7.3.250.0120.00916.39
7.3.240.0110.00616.43
7.3.230.0060.01016.44
7.3.210.0140.00416.45
7.3.200.0070.01419.39
7.3.190.0070.01016.46
7.3.180.0170.00016.48
7.3.170.0120.00416.49
7.3.160.0030.01316.36
7.3.120.0030.01314.90
7.3.110.0110.00714.77
7.3.100.0000.01614.78
7.3.90.0030.00915.01
7.3.80.0040.00814.98
7.3.70.0030.01314.90
7.3.60.0000.01514.91
7.3.50.0070.00714.94
7.3.40.0120.00314.91
7.3.30.0080.00814.71
7.3.20.0040.00716.81
7.3.10.0100.00316.68
7.3.00.0090.00316.72
7.2.330.0090.00916.41
7.2.320.0110.00916.27
7.2.310.0080.00816.33
7.2.300.0120.00316.33
7.2.290.0110.00616.49
7.2.250.0090.00914.59
7.2.240.0080.01115.16
7.2.230.0060.00914.88
7.2.220.0030.01314.94
7.2.210.0040.01114.48
7.2.200.0030.01215.01
7.2.190.0040.01414.94
7.2.180.0100.00314.62
7.2.170.0060.01014.84
7.2.80.0240.00015.96
7.2.60.0030.00616.78
7.1.330.0000.01515.81
7.1.320.0060.00616.02
7.1.310.0030.01015.75
7.1.300.0040.00415.71
7.1.290.0080.00515.59
7.1.280.0070.00715.54
7.1.270.0050.00315.67
7.1.260.0040.00415.67
7.1.200.0090.00315.55
7.1.70.0000.01017.22
7.1.60.0030.01519.40
7.1.50.0130.01316.92
7.1.00.0100.06722.43
7.0.200.0000.00716.63
7.0.140.0070.06722.00
7.0.60.0130.05019.93
7.0.50.0070.04317.88
7.0.40.0170.07320.41
7.0.30.0300.07720.21
7.0.20.0200.03720.10
7.0.10.0030.08020.11
7.0.00.0070.07020.04
5.6.280.0030.07320.91
5.6.210.0070.08020.61
5.6.200.0070.07318.18
5.6.190.0170.07720.45
5.6.180.0430.06720.73
5.6.170.0400.07020.47
5.6.160.0100.08320.62
5.6.150.0070.07718.25
5.6.140.0100.04018.15
5.6.130.0000.09318.20
5.6.120.0030.09021.04
5.6.110.0100.05021.01
5.6.100.0170.07721.00
5.6.90.0130.07720.98
5.6.80.0030.04720.41
5.5.350.0130.06720.41
5.5.340.0130.08018.05
5.5.330.0100.04720.31
5.5.320.3730.04720.25
5.5.310.0270.04020.34
5.5.300.0030.08317.96
5.5.290.0000.08718.02
5.5.280.0130.05020.88
5.5.270.0070.05720.84
5.5.260.0170.08020.77
5.5.250.0000.08320.59
5.5.240.0030.07320.26
5.4.450.0400.05019.55
5.4.440.0600.06719.59
5.4.430.0100.05719.21
5.4.420.0170.06019.54
5.4.410.0130.08018.86
5.4.400.0230.05718.76
5.4.390.0000.06318.59
5.4.380.0170.06018.75
5.4.370.0170.03318.59
5.4.360.0100.04318.64
5.4.350.0070.03512.02
5.4.340.0060.03912.02
5.4.320.0040.04812.51
5.4.310.0040.04012.50
5.4.300.0060.03612.51
5.4.290.0050.03812.50
5.4.280.0070.03412.39
5.4.270.0070.03412.39
5.4.260.0060.03712.40
5.4.250.0060.03712.39
5.4.240.0080.03412.40
5.4.230.0060.03612.39
5.4.220.0070.03412.39
5.4.210.0080.04012.39
5.4.200.0070.03712.39
5.4.190.0010.03912.38
5.4.180.0010.04112.39
5.4.170.0060.04012.39
5.4.160.0070.03412.39
5.4.150.0100.03112.39
5.4.140.0080.03412.07
5.4.130.0060.03412.06
5.4.120.0040.03612.02
5.4.110.0050.04012.01
5.4.100.0080.03212.01
5.4.90.0030.03912.01
5.4.80.0040.03912.01
5.4.70.0040.03712.01
5.4.60.0060.03412.00
5.4.50.0040.04012.01
5.4.40.0040.03612.00
5.4.30.0050.03611.99
5.4.20.0080.03411.99
5.4.10.0080.04212.00
5.4.00.0050.03911.48
5.3.290.0060.04412.80
5.3.280.0060.03812.71
5.3.270.0050.04012.72
5.3.260.0080.03812.72
5.3.250.0060.03612.72
5.3.240.0120.03412.71
5.3.230.0030.04012.71
5.3.220.0060.03612.68
5.3.210.0030.04012.68
5.3.200.0090.03212.68
5.3.190.0040.03912.68
5.3.180.0010.04112.67
5.3.170.0090.03312.67
5.3.160.0030.03912.67
5.3.150.0050.03712.67
5.3.140.0040.03712.66
5.3.130.0050.03812.66
5.3.120.0010.04312.66
5.3.110.0050.03812.65
5.3.100.0050.03812.12
5.3.90.0050.04812.10
5.3.80.0030.03812.09
5.3.70.0040.03712.09
5.3.60.0070.03412.07
5.3.50.0050.03612.02
5.3.40.0060.03512.02
5.3.30.0040.03611.98
5.3.20.0050.03611.76
5.3.10.0070.03311.72
5.3.00.0040.03711.71
5.2.170.0060.0289.19
5.2.160.0020.0319.18
5.2.150.0040.0319.18
5.2.140.0040.0309.18
5.2.130.0040.0299.14
5.2.120.0020.0309.14
5.2.110.0030.0319.15
5.2.100.0070.0259.14
5.2.90.0030.0299.14
5.2.80.0020.0329.14
5.2.70.0040.0299.13
5.2.60.0040.0299.09
5.2.50.0040.0299.06
5.2.40.0040.0289.04
5.2.30.0030.0309.01
5.2.20.0040.0299.01
5.2.10.0040.0288.93
5.2.00.0030.0308.79
5.1.60.0040.0288.07
5.1.50.0030.0298.07
5.1.40.0060.0218.05
5.1.30.0060.0238.40
5.1.20.0060.0258.42
5.1.10.0060.0248.14
5.1.00.0050.0248.14
5.0.50.0020.0216.62
5.0.40.0020.0216.48
5.0.30.0010.0346.30
5.0.20.0020.0206.26
5.0.10.0030.0206.25
5.0.00.0030.0306.23
4.4.90.0030.0154.77
4.4.80.0040.0184.76
4.4.70.0030.0214.75
4.4.60.0030.0174.75
4.4.50.0040.0154.77
4.4.40.0010.0264.71
4.4.30.0010.0164.76
4.4.20.0050.0124.85
4.4.10.0040.0174.85
4.4.00.0010.0264.76
4.3.110.0030.0164.66
4.3.100.0050.0124.66
4.3.90.0020.0154.63
4.3.80.0030.0244.58
4.3.70.0040.0134.63
4.3.60.0030.0144.63
4.3.50.0020.0164.63
4.3.40.0000.0264.54
4.3.30.0010.0173.29
4.3.20.0030.0183.26
4.3.10.0020.0173.23
4.3.00.0130.0206.82

preferences:
86.7 ms | 401 KiB | 5 Q