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++; } } } } } } echo $count1;

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.0060.01518.15
8.3.50.0080.00821.21
8.3.40.0170.00318.63
8.3.30.0070.00719.14
8.3.20.0040.00420.39
8.3.10.0000.00721.92
8.3.00.0070.00022.39
8.2.180.0090.00618.16
8.2.170.0070.00722.96
8.2.160.0040.01120.35
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0080.00019.65
8.2.110.0030.00721.96
8.2.100.0080.00419.11
8.2.90.0000.00819.27
8.2.80.0060.00317.97
8.2.70.0030.00617.48
8.2.60.0000.00717.80
8.2.50.0030.00918.07
8.2.40.0000.00718.03
8.2.30.0040.00418.10
8.2.20.0000.00717.68
8.2.10.0040.00417.65
8.2.00.0030.00617.83
8.1.280.0160.00325.92
8.1.270.0030.00620.21
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0080.00323.82
8.1.230.0030.00619.08
8.1.220.0080.00017.74
8.1.210.0000.00918.77
8.1.200.0100.00017.35
8.1.190.0040.00417.53
8.1.180.0060.00318.72
8.1.170.0000.00818.74
8.1.160.0040.00422.04
8.1.150.0040.00418.57
8.1.140.0040.00417.49
8.1.130.0000.00717.89
8.1.120.0000.00717.50
8.1.110.0040.00417.55
8.1.100.0050.00217.49
8.1.90.0000.00717.49
8.1.80.0000.00817.39
8.1.70.0070.00017.54
8.1.60.0000.00817.68
8.1.50.0040.00417.51
8.1.40.0000.00817.57
8.1.30.0040.00417.57
8.1.20.0030.00517.68
8.1.10.0000.00817.46
8.1.00.0000.00817.50
8.0.300.0000.00818.77
8.0.290.0040.00417.18
8.0.280.0000.00718.35
8.0.270.0000.00717.27
8.0.260.0000.00716.73
8.0.250.0070.00017.04
8.0.240.0050.00316.93
8.0.230.0030.00316.89
8.0.220.0070.00016.88
8.0.210.0070.00016.76
8.0.200.0060.00016.97
8.0.190.0030.00416.96
8.0.180.0000.00816.96
8.0.170.0080.00016.84
8.0.160.0000.00817.01
8.0.150.0040.00716.87
8.0.140.0040.00416.91
8.0.130.0060.00013.41
8.0.120.0040.00416.93
8.0.110.0040.00416.88
8.0.100.0070.00316.95
8.0.90.0000.00716.86
8.0.80.0100.00716.87
8.0.70.0000.00716.70
8.0.60.0030.00516.87
8.0.50.0040.00416.75
8.0.30.0090.01017.06
8.0.20.0130.00517.40
8.0.10.0000.00717.11
8.0.00.0120.00816.81
7.4.330.0000.00715.05
7.4.320.0040.00416.44
7.4.300.0030.00316.55
7.4.290.0070.00016.52
7.4.280.0040.00416.51
7.4.270.0030.00316.54
7.4.260.0050.00216.55
7.4.250.0040.00416.55
7.4.240.0020.00516.48
7.4.230.0070.00016.47
7.4.220.0070.01116.56
7.4.210.0070.00816.66
7.4.200.0030.00316.70
7.4.190.0030.00316.48
7.4.160.0130.00416.74
7.4.150.0090.00917.40
7.4.140.0100.00717.86
7.4.130.0110.00616.62
7.4.120.0130.00816.62
7.4.110.0060.01216.68
7.4.100.0110.00716.68
7.4.90.0060.01216.61
7.4.80.0110.00719.39
7.4.70.0140.00316.49
7.4.60.0060.01316.62
7.4.50.0030.00616.48
7.4.40.0100.00722.77
7.4.30.0100.00616.41
7.4.00.0030.01014.93
7.3.330.0000.00613.21
7.3.320.0030.00313.14
7.3.310.0040.00416.34
7.3.300.0030.00316.29
7.3.290.0070.00716.23
7.3.280.0090.00816.25
7.3.270.0130.00317.40
7.3.260.0090.00916.27
7.3.250.0110.00616.32
7.3.240.0060.01216.58
7.3.230.0500.01116.43
7.3.210.0130.00716.55
7.3.200.0080.00919.39
7.3.190.0030.01416.54
7.3.180.0120.00616.50
7.3.170.0140.00616.64
7.3.160.0150.00016.14
7.3.120.0070.00714.77
7.3.110.0130.00314.97
7.3.100.0070.00714.73
7.3.90.0030.01314.39
7.3.80.0070.00714.64
7.3.70.0100.00614.85
7.3.60.0000.01614.82
7.3.50.0000.01414.85
7.3.40.0060.01014.82
7.3.30.0040.01114.62
7.3.20.0030.01316.33
7.3.10.0040.00716.63
7.3.00.0080.00816.47
7.2.330.0110.00616.51
7.2.320.0070.01016.43
7.2.310.0120.01216.46
7.2.300.0070.01016.69
7.2.290.0100.00616.38
7.2.240.0060.00914.78
7.2.230.0120.00315.05
7.2.220.0060.00615.05
7.2.210.0070.01414.76
7.2.200.0100.00714.91
7.2.190.0060.00915.14
7.2.180.0060.01214.76
7.2.170.0040.00815.05
7.2.160.0060.00915.05
7.2.150.0110.00416.80
7.2.140.0060.01216.88
7.2.130.0060.00816.92
7.2.120.0020.01116.89
7.2.110.0070.00716.85
7.2.100.0070.00716.90
7.2.90.0050.00616.79
7.2.80.0040.00816.54
7.2.70.0050.00716.90
7.2.60.0020.01316.82
7.2.50.0050.00916.79
7.2.40.0070.00716.60
7.2.30.0110.00316.76
7.2.20.0070.00716.88
7.2.10.0030.00616.99
7.2.00.0060.00817.61
7.1.330.0110.00415.62
7.1.320.0030.01015.94
7.1.310.0080.01215.56
7.1.300.0030.00715.76
7.1.290.0110.00415.43
7.1.280.0050.00515.64
7.1.270.0000.01315.55
7.1.260.0040.00715.94
7.1.250.0040.00715.86
7.1.240.0070.00715.79
7.1.230.0070.00315.73
7.1.220.0090.00315.45
7.1.210.0030.01015.80
7.1.200.0090.00215.54
7.1.190.0040.00715.59
7.1.180.0000.01615.64
7.1.170.0130.00015.59
7.1.160.0060.00915.84
7.1.150.0060.00315.68
7.1.140.0130.00315.98
7.1.130.0000.00815.83
7.1.120.0000.01115.96
7.1.110.0110.00015.86
7.1.100.0050.00716.98
7.1.90.0130.00715.88
7.1.80.0060.00615.62
7.1.70.0070.01116.42
7.1.60.0070.00917.81
7.1.50.0110.00816.48
7.1.40.0120.00315.52
7.1.30.0040.01115.64
7.1.20.0030.01015.89
7.1.10.0050.00315.70
7.1.00.0030.02219.08
7.0.330.0030.00715.53
7.0.320.0000.01115.44
7.0.310.0060.00315.51
7.0.300.0060.00315.45
7.0.290.0110.00015.26
7.0.280.0070.00715.33
7.0.270.0070.00715.37
7.0.260.0050.00315.35
7.0.250.0060.00315.29
7.0.240.0040.01115.40
7.0.230.0040.00815.42
7.0.220.0050.00615.51
7.0.210.0040.01015.39
7.0.200.0080.00316.04
7.0.190.0040.00715.40
7.0.180.0070.00715.17
7.0.170.0070.00415.63
7.0.160.0070.00715.50
7.0.150.0070.00715.61
7.0.140.0030.04018.64
7.0.130.0000.01015.35
7.0.120.0030.00615.38
7.0.110.0090.00615.60
7.0.100.0000.01115.41
7.0.90.0060.00315.43
7.0.80.0060.00315.52
7.0.70.0040.00915.61
7.0.60.0140.02517.66
7.0.50.0050.02216.74
7.0.40.0030.03516.72
7.0.30.0120.02716.88
7.0.20.0100.02716.83
7.0.10.0080.02716.80
7.0.00.0050.04716.81
5.6.380.0080.00014.50
5.6.370.0030.01414.32
5.6.360.0060.00614.32
5.6.350.0070.00714.26
5.6.340.0120.00014.49
5.6.330.0140.00014.61
5.6.320.0040.00414.57
5.6.310.0030.01014.00
5.6.300.0070.01114.64
5.6.290.0060.00314.21
5.6.280.0040.03817.48
5.6.270.0070.00714.46
5.6.260.0000.01414.41
5.6.250.0060.00614.18
5.6.240.0080.00414.39
5.6.230.0030.01014.13
5.6.220.0090.00314.08
5.6.210.0060.02717.49
5.6.200.0040.04716.09
5.6.190.0050.05017.46
5.6.180.1950.02217.30
5.6.170.0150.05017.31
5.6.160.0090.04617.39
5.6.150.0070.02316.36
5.6.140.0060.02816.38
5.6.130.0070.04416.30
5.6.120.0070.04317.59
5.6.110.0090.04017.87
5.6.100.0030.04617.74
5.6.90.0020.05317.55
5.6.80.0080.03617.28
5.6.70.0100.00714.21
5.6.60.0040.00814.53
5.6.50.0030.01014.18
5.6.40.0080.00414.18
5.6.30.0030.01214.34
5.6.20.0030.01314.25
5.6.10.0040.01113.82
5.6.00.0000.01414.04
5.5.380.0030.00910.82
5.5.370.0110.00010.79
5.5.360.0040.01110.96
5.5.350.0130.03815.83
5.5.340.0070.03714.57
5.5.330.0050.03615.68
5.5.320.0170.03215.77
5.5.310.0170.04015.53
5.5.300.0070.02814.37
5.5.290.0080.03314.45
5.5.280.0060.02515.96
5.5.270.0120.02215.81
5.5.260.0030.03515.98
5.5.250.0010.02415.70
5.5.240.0060.02015.63
5.5.230.0040.00710.93
5.5.220.0030.00311.11
5.5.210.0030.00310.77
5.5.200.0030.00611.22
5.5.190.0060.00611.11
5.5.180.0000.00611.12
5.5.170.0120.00010.86
5.5.160.0000.00710.86
5.5.150.0120.00010.89
5.5.140.0000.01011.14
5.5.130.0000.00610.91
5.5.120.0040.00410.89
5.5.110.0070.00710.99
5.5.100.0030.00611.19
5.5.90.0030.00610.77
5.5.80.0080.00410.89
5.5.70.0070.00411.09
5.5.60.0070.00710.82
5.5.50.0050.00310.88
5.5.40.0000.00610.95
5.5.30.0080.00310.87
5.5.20.0000.01310.80
5.5.10.0060.00610.98
5.5.00.0060.00610.88
5.4.450.0020.03515.05
5.4.440.0470.03015.20
5.4.430.0430.04015.05
5.4.420.0050.03515.10
5.4.410.0450.03515.10
5.4.400.0210.02814.92
5.4.390.0330.03714.56
5.4.380.0200.02714.88
5.4.370.0070.02814.73
5.4.360.0100.02714.77
5.4.350.0040.02111.43
5.4.340.0050.02111.34
5.4.330.0030.00910.89
5.4.320.0030.02211.63
5.4.310.0060.02311.83
5.4.300.0070.02111.54
5.4.290.0070.02411.63
5.4.280.0060.02111.47
5.4.270.0030.02711.68
5.4.260.0020.02711.68
5.4.250.0130.02514.81
5.4.240.0070.02614.71
5.4.230.0060.02814.80
5.4.220.0050.03314.71
5.4.210.0060.03114.79
5.4.200.0020.03114.91
5.4.190.0080.03714.90
5.4.180.0050.03514.78
5.4.170.0060.03014.86
5.4.160.0050.03314.80
5.4.150.0020.03314.69
5.4.140.0070.03013.66
5.4.130.0080.02513.57
5.4.120.0030.02913.61
5.4.110.0050.03013.61
5.4.100.0160.02613.62
5.4.90.0080.02513.61
5.4.80.0090.02313.55
5.4.70.0110.03313.75
5.4.60.0120.03013.64
5.4.50.0080.02513.73
5.4.40.0050.02713.75
5.4.30.0020.02813.44
5.4.20.0120.02513.71
5.4.10.0020.03113.67
5.4.00.0040.02913.48
5.3.290.0050.02411.67
5.3.280.0050.02812.36
5.3.270.0080.02812.62
5.3.260.0020.04112.50
5.3.250.0050.02812.45
5.3.240.0080.02512.42
5.3.230.0050.02912.57
5.3.220.0070.03712.40
5.3.210.0090.02712.55
5.3.200.0090.03012.33
5.3.190.0050.02912.52
5.3.180.0080.02512.50
5.3.170.0070.03412.59
5.3.160.0060.02712.52
5.3.150.0070.02512.50
5.3.140.0070.02612.37
5.3.130.0070.02812.58
5.3.120.0080.02912.62
5.3.110.0060.03312.60
5.3.100.0130.02512.13
5.3.90.0050.03512.12
5.3.80.0050.02712.30
5.3.70.0070.02812.19
5.3.60.0080.02512.19
5.3.50.0090.02912.25
5.3.40.0070.02712.07
5.3.30.0100.03512.16
5.3.20.0030.02812.06
5.3.10.0050.02711.92
5.3.00.0030.02811.93
5.2.170.0070.02110.43
5.2.160.0050.02210.32
5.2.150.0030.02310.38
5.2.140.0040.02310.32
5.2.130.0070.02810.26
5.2.120.0050.02310.23
5.2.110.0030.02310.29
5.2.100.0000.02510.17
5.2.90.0080.01810.10
5.2.80.0070.02010.04
5.2.70.0050.02210.05
5.2.60.0000.02610.20
5.2.50.0050.02510.07
5.2.40.0000.02410.23
5.2.30.0070.02210.03
5.2.20.0020.03310.00
5.2.10.0040.02510.04
5.2.00.0040.0259.97
5.1.60.0050.0189.16
5.1.50.0060.0159.35
5.1.40.0000.0219.18
5.1.30.0050.0189.56
5.1.20.0070.0209.40
5.1.10.0030.0209.32
5.1.00.0060.0159.21
5.0.50.0030.0168.47
5.0.40.0010.0258.34
5.0.30.0020.0228.29
5.0.20.0030.0158.29
5.0.10.0060.0138.17
5.0.00.0040.0218.17
4.4.90.0020.0157.66
4.4.80.0030.0127.66
4.4.70.0030.0167.66
4.4.60.0000.0147.66
4.4.50.0020.0137.66
4.4.40.0050.0177.66
4.4.30.0000.0147.66
4.4.20.0020.0127.66
4.4.10.0000.0167.66
4.4.00.0020.0187.66
4.3.110.0010.0137.66
4.3.100.0000.0147.66
4.3.90.0020.0127.66
4.3.80.0020.0207.66
4.3.70.0020.0137.66
4.3.60.0000.0127.66
4.3.50.0050.0157.66
4.3.40.0020.0197.66
4.3.30.0050.0087.66
4.3.20.0020.0137.66
4.3.10.0010.0137.66
4.3.00.0010.0137.63

preferences:
56.32 ms | 400 KiB | 5 Q