3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array=Array ( "21" => Array ( "0" => 3.5, "65" => Array ( "0" => 44.125 ), "150" => Array ( "0" => 15.25 ), "151" => Array ( "0" => 17.333333333333 ) ), "23" => Array ( "0" => 0, "166" => Array ( "0" => 26 ), "172" => Array ( "0" =>"" ), "182" => Array ( "0" => 20.333333333333 ), "183" => Array ( "0" => 24.125 ) ) ); $count1 = 0; $count2 = 0; foreach ($array as $key3 => $value3) { if($key3 == "21") { foreach ($value3 as $key => $value) { if (strpos($key, '0') === 0) { $count1++; } if(is_array($value)) { foreach($value as $key2=>$value2) { if(strpos($key2,'0') === 0) { $count1++ ; } } } } } if($key3 == "23") { foreach ($value3 as $key => $value) { if (strpos($key, '0') === 0) { $count2++; } if(is_array($value)) { foreach($value as $key2=>$value2) { if(strpos($key2,'0') === 0) { $count2++; } } } } } } $array[21][0] = (21/$count1); $array[23][0] = (23/$count2); print_r($array);

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.0200.00018.30
8.3.50.0110.00421.15
8.3.40.0110.00719.02
8.3.30.0140.00318.96
8.3.20.0000.00720.38
8.3.10.0030.00522.09
8.3.00.0040.00422.39
8.2.180.0150.00018.16
8.2.170.0070.00722.96
8.2.160.0180.00420.47
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0070.00320.63
8.2.110.0070.00420.55
8.2.100.0040.00719.30
8.2.90.0040.00419.26
8.2.80.0000.00918.05
8.2.70.0110.00017.25
8.2.60.0090.00018.05
8.2.50.0080.00418.07
8.2.40.0000.00918.28
8.2.30.0040.00418.06
8.2.20.0070.00017.76
8.2.10.0000.00817.80
8.2.00.0030.00617.79
8.1.280.0150.00425.92
8.1.270.0000.00820.53
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0030.00623.96
8.1.230.0030.00719.21
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0060.00317.48
8.1.190.0040.00417.52
8.1.180.0040.00418.55
8.1.170.0000.00818.49
8.1.160.0000.00722.09
8.1.150.0000.00718.59
8.1.140.0000.00717.50
8.1.130.0070.00017.79
8.1.120.0040.00417.57
8.1.110.0040.00417.43
8.1.100.0040.00417.52
8.1.90.0000.00817.41
8.1.80.0000.00817.46
8.1.70.0030.00317.43
8.1.60.0040.00417.54
8.1.50.0040.00417.59
8.1.40.0000.00817.45
8.1.30.0000.00817.70
8.1.20.0060.00317.70
8.1.10.0050.00317.63
8.1.00.0000.00817.60
8.0.300.0000.00818.77
8.0.290.0030.00317.30
8.0.280.0000.00818.53
8.0.270.0080.00017.16
8.0.260.0030.00316.80
8.0.250.0000.00716.89
8.0.240.0080.00016.90
8.0.230.0030.00517.05
8.0.220.0040.00416.98
8.0.210.0000.00716.91
8.0.200.0000.00617.02
8.0.190.0000.00717.04
8.0.180.0080.00316.85
8.0.170.0000.00716.96
8.0.160.0080.00016.87
8.0.150.0070.00416.77
8.0.140.0000.00716.78
8.0.130.0000.00613.40
8.0.120.0000.00716.88
8.0.110.0040.00416.91
8.0.100.0000.00816.75
8.0.90.0040.00416.89
8.0.80.0060.00916.98
8.0.70.0040.00416.93
8.0.60.0000.00716.98
8.0.50.0050.00216.80
8.0.30.0050.01617.03
8.0.20.0060.01217.44
8.0.10.0000.00717.13
8.0.00.0110.00916.88
7.4.330.0000.00615.00
7.4.320.0060.00016.56
7.4.300.0030.00316.68
7.4.290.0030.00316.63
7.4.280.0060.00316.59
7.4.270.0030.00316.55
7.4.260.0000.00716.61
7.4.250.0000.00716.58
7.4.240.0050.00216.59
7.4.230.0030.00316.44
7.4.220.0170.00316.53
7.4.210.0070.01116.61
7.4.200.0000.00716.71
7.4.190.0030.00316.71
7.4.160.0120.00416.73
7.4.150.0090.00917.40
7.4.140.0080.01017.86
7.4.130.0100.00816.42
7.4.120.0050.01216.69
7.4.110.0050.01516.51
7.4.100.0120.00616.59
7.4.90.0060.01216.36
7.4.80.0060.01219.39
7.4.70.0030.01316.52
7.4.60.0100.00716.55
7.4.50.0030.00316.39
7.4.40.0060.00922.77
7.4.30.0080.00816.36
7.4.10.0070.01315.05
7.4.00.0040.00814.95
7.3.330.0000.00513.10
7.3.320.0000.00813.18
7.3.310.0030.00316.46
7.3.300.0030.00316.19
7.3.290.0100.00916.34
7.3.280.0080.01016.40
7.3.270.0070.01017.40
7.3.260.0070.01016.46
7.3.250.0120.00816.51
7.3.240.0060.01016.48
7.3.230.0070.01316.44
7.3.210.0070.01116.35
7.3.200.0100.00619.39
7.3.190.0100.00716.40
7.3.180.0120.00916.67
7.3.170.0070.01016.42
7.3.160.0000.01516.39
7.3.130.0000.01614.96
7.3.120.0100.00314.99
7.3.110.0060.01214.83
7.3.100.0040.01514.93
7.3.90.0040.01414.90
7.3.80.0100.00315.07
7.3.70.0040.00814.60
7.3.60.0100.00614.98
7.3.50.0060.01014.83
7.3.40.0130.00314.92
7.3.30.0070.00714.84
7.3.20.0060.01016.51
7.3.10.0070.00716.56
7.3.00.0070.00716.61
7.2.330.0080.00816.75
7.2.320.0150.00616.67
7.2.310.0100.00616.70
7.2.300.0160.00016.49
7.2.290.0090.00616.46
7.2.260.0040.00714.98
7.2.250.0070.01315.31
7.2.240.0040.01115.25
7.2.230.0080.01115.02
7.2.220.0000.01514.68
7.2.210.0090.00615.34
7.2.200.0030.01114.86
7.2.190.0060.00915.14
7.2.180.0000.01415.11
7.2.170.0070.01015.17
7.2.160.0140.00014.83
7.2.150.0100.00316.82
7.2.140.0080.00317.06
7.2.130.0000.01417.03
7.2.120.0030.00716.83
7.2.110.0110.00716.69
7.2.100.0000.01516.94
7.2.90.0000.01517.05
7.2.80.0060.00917.12
7.2.70.0030.01217.05
7.2.60.0050.00816.87
7.2.50.0030.00916.97
7.2.40.0070.00716.88
7.2.30.0070.01016.61
7.2.20.0070.01016.91
7.2.10.0100.00316.98
7.2.00.0080.00518.26
7.1.330.0070.00715.80
7.1.320.0060.00915.88
7.1.310.0070.00715.78
7.1.300.0030.01015.61
7.1.290.0090.00315.80
7.1.280.0000.01215.77
7.1.270.0060.00915.80
7.1.260.0080.00415.86
7.1.250.0030.00915.81
7.1.240.0030.00716.01
7.1.230.0060.00615.86
7.1.220.0030.01215.81
7.1.210.0050.00315.80
7.1.200.0090.00415.70
7.1.190.0070.01015.69
7.1.180.0030.00715.92
7.1.170.0040.01116.00
7.1.160.0060.00915.96
7.1.150.0040.00815.96
7.1.140.0000.01315.75
7.1.130.0040.00715.89
7.1.120.0080.00815.68
7.1.110.0060.00615.64
7.1.100.0190.00616.87
7.1.90.0060.00915.67
7.1.80.0100.00715.76
7.1.70.0040.00516.46
7.1.60.0050.01517.64
7.1.50.0080.00716.33
7.1.40.0000.01615.83
7.1.30.0070.00715.53
7.1.20.0030.00715.93
7.1.10.0070.01115.60
7.1.00.0050.04219.19
7.0.330.0060.00615.39
7.0.320.0060.00315.49
7.0.310.0000.00915.30
7.0.300.0050.00515.26
7.0.290.0030.00715.48
7.0.280.0070.00315.45
7.0.270.0000.01115.63
7.0.260.0040.00815.64
7.0.250.0060.00615.41
7.0.240.0070.00715.40
7.0.230.0030.01415.13
7.0.220.0070.00315.36
7.0.210.0100.00315.44
7.0.200.0080.00316.11
7.0.190.0110.00315.50
7.0.180.0090.00615.52
7.0.170.0030.01015.56
7.0.160.0070.00315.53
7.0.150.0030.01215.49
7.0.140.0110.03718.84
7.0.130.0030.01415.42
7.0.120.0110.00315.31
7.0.110.0090.00615.45
7.0.100.0060.00915.24
7.0.90.0060.00315.58
7.0.80.0070.00715.49
7.0.70.0090.00915.51
7.0.60.0070.04517.71
7.0.50.0030.02616.68
7.0.40.0050.02516.83
7.0.30.0210.02316.81
7.0.20.0130.03316.71
7.0.10.0220.03316.77
7.0.00.0050.03116.87
5.6.400.0070.01114.79
5.6.390.0070.00714.30
5.6.380.0040.00814.66
5.6.370.0040.00714.74
5.6.360.0080.00514.36
5.6.350.0110.00714.47
5.6.340.0040.01114.66
5.6.330.0100.00314.75
5.6.320.0070.01014.58
5.6.310.0040.01114.28
5.6.300.0090.00914.53
5.6.290.0090.00914.42
5.6.280.0150.03217.69
5.6.270.0040.01114.49
5.6.260.0060.00914.36
5.6.250.0060.00614.33
5.6.240.0000.01214.29
5.6.230.0090.00614.39
5.6.220.0040.00814.30
5.6.210.0080.03217.55
5.6.200.0060.04316.21
5.6.190.0100.04417.29
5.6.180.1720.02517.43
5.6.170.0170.04517.38
5.6.160.0050.04317.43
5.6.150.0070.04516.43
5.6.140.0100.02016.31
5.6.130.0080.04616.27
5.6.120.0050.03617.72
5.6.110.0080.02317.61
5.6.100.0020.03817.71
5.6.90.0060.03917.75
5.6.80.0070.04317.50
5.6.70.0190.03517.33
5.6.60.0030.00614.38
5.6.50.0030.01314.39
5.6.40.0090.00014.38
5.6.30.0060.00914.24
5.6.20.0070.00714.37
5.6.10.0000.01514.45
5.6.00.0040.01114.28
5.5.380.0030.01614.01
5.5.370.0070.01314.11
5.5.360.0030.01214.60
5.5.350.0150.03817.35
5.5.340.0050.04516.38
5.5.330.0050.04117.05
5.5.320.0150.04617.49
5.5.310.0180.03617.21
5.5.300.0020.04216.23
5.5.290.0130.02816.07
5.5.280.0110.03517.63
5.5.270.0050.03117.60
5.5.260.0110.04217.61
5.5.250.0050.03317.51
5.5.240.0080.02617.25
5.5.230.0000.01014.13
5.5.220.0090.00614.21
5.5.210.0000.01414.43
5.5.200.0060.00613.96
5.5.190.0040.00814.26
5.5.180.0080.00814.43
5.5.170.0130.00014.59
5.5.160.0040.01114.36
5.5.150.0040.01414.44
5.5.140.0040.01114.09
5.5.130.0130.00314.53
5.5.120.0040.00414.39
5.5.110.0070.00714.21
5.5.100.0100.00314.54
5.5.90.0060.00614.32
5.5.80.0090.00314.53
5.5.70.0070.01314.40
5.5.60.0090.00614.47
5.5.50.0120.00414.11
5.5.40.0060.00914.28
5.5.30.0060.00614.25
5.5.20.0100.00713.96
5.5.10.0060.00913.81
5.5.00.0030.00913.95
5.4.450.1610.02215.25
5.4.440.0030.02915.26
5.4.430.0870.03715.29
5.4.420.2320.02415.39
5.4.410.1840.02015.19
5.4.400.2080.02415.01
5.4.390.2120.02415.10
5.4.380.2120.02515.02
5.4.370.2060.02115.25
5.4.360.1810.02114.88
5.4.350.1950.02315.22
5.4.340.2130.02015.01
5.4.330.0040.00411.01
5.4.320.1850.02315.14
5.4.310.2010.02515.26
5.4.300.1980.02214.96
5.4.290.1970.02615.09
5.4.280.1820.02015.13
5.4.270.2050.02415.11
5.4.260.2100.02615.04
5.4.250.2170.02714.88
5.4.240.2230.02415.18
5.4.230.2050.02415.05
5.4.220.2370.02215.22
5.4.210.1880.02315.15
5.4.200.1820.02415.08
5.4.190.0050.03115.24
5.4.180.2430.02015.07
5.4.170.2020.02615.02
5.4.160.2080.02615.22
5.4.150.1850.02315.24
5.4.140.1930.01813.88
5.4.130.2580.02213.80
5.4.120.2000.01513.74
5.4.110.2250.02613.79
5.4.100.0100.03713.88
5.4.90.0050.03713.69
5.4.80.1890.01813.53
5.4.70.2320.01813.69
5.4.60.1880.02113.76
5.4.50.2250.02413.81
5.4.40.1920.02313.85
5.4.30.1830.02613.66
5.4.20.1400.02713.77
5.4.10.1670.02713.75
5.4.00.0970.02213.51
5.3.290.2130.02612.69
5.3.280.2260.01812.67
5.3.270.2020.02212.75
5.3.260.2010.02412.62
5.3.250.1950.02012.65
5.3.240.1920.02512.50
5.3.230.2140.02112.63
5.3.220.2390.02312.54
5.3.210.2290.01412.44
5.3.200.1680.02312.56
5.3.190.0110.03612.59
5.3.180.1520.02212.54
5.3.170.2220.02512.54
5.3.160.1800.02512.63
5.3.150.1930.01812.63
5.3.140.2100.02012.51
5.3.130.1970.02612.63
5.3.120.1860.02112.60
5.3.110.1330.02112.53
5.3.100.1180.01812.41
5.3.90.1610.02412.19
5.3.80.1810.01812.28
5.3.70.1850.01712.18
5.3.60.1820.01812.22
5.3.50.1750.02012.32
5.3.40.1700.02312.31
5.3.30.1480.02412.22
5.3.20.1720.01912.10
5.3.10.1150.02212.02
5.3.00.1940.01911.83
5.2.170.3170.02711.32
5.2.160.2100.02711.12
5.2.150.2030.03311.21
5.2.140.2200.02711.32
5.2.130.2430.02311.06
5.2.120.1930.02711.06
5.2.110.2030.02711.19
5.2.100.3670.03011.08
5.2.90.3100.03311.13
5.2.80.3470.03311.15
5.2.70.3500.03311.11
5.2.60.3530.02711.06
5.2.50.3570.03011.09
5.2.40.2600.03011.01
5.2.30.3070.02710.98
5.2.20.3300.02710.97
5.2.10.2870.03010.93
5.2.00.2570.02310.74
5.1.60.3030.02010.05
5.1.50.3030.02310.14
5.1.40.2970.02310.01
5.1.30.2200.03010.40
5.1.20.2900.03010.36
5.1.10.2330.02710.09
5.1.00.2400.02710.15
5.0.50.1270.0278.53
5.0.40.1530.0208.33
5.0.30.1500.0378.28
5.0.20.1300.0178.20
5.0.10.1500.0208.25
5.0.00.1270.0378.23
4.4.90.1730.0135.92
4.4.80.1670.0205.87
4.4.70.1470.0175.86
4.4.60.1800.0175.95
4.4.50.1830.0135.80
4.4.40.1530.0235.85
4.4.30.1830.0205.82
4.4.20.1300.0205.93
4.4.10.1270.0105.88
4.4.00.0800.0235.93
4.3.110.1530.0205.80
4.3.100.1500.0205.74
4.3.90.1330.0135.75
4.3.80.1300.0305.75
4.3.70.1700.0135.78
4.3.60.1870.0135.73
4.3.50.1770.0175.75
4.3.40.1830.0305.66
4.3.30.0800.0175.45
4.3.20.0570.0305.45
4.3.10.0930.0175.45
4.3.00.1030.0205.45

preferences:
46.12 ms | 400 KiB | 5 Q