3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( '3A32', '4565', '7890', '0012', 'A324', '9002', '3200', '345A', '0436' ); $n1 = 3; $n2 = 3; $n3 = 'A'; function checkValues($array,$numbers=array()){ $finalArray = []; if(!empty($numbers)){ foreach($array as $arr){ $splitArr = str_split($arr); $matched = true; $count_number_Array = array_count_values($numbers); $count_split_array = array_count_values($splitArr); foreach($count_number_Array as $key=>$value){ if(!isset($count_split_array[$key]) || $count_split_array[$key] < $value){ $matched = false; break; } } if($matched === true){ $finalArray[] = $arr; } } } return $finalArray; } print_r(checkValues($array, array($n1,$n2,$n3)));

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.5.10.0060.01216.53
8.5.00.0150.00620.19
8.4.150.0030.00014.05
8.4.140.0100.01217.59
8.4.130.0110.00918.65
8.4.120.0120.00720.63
8.4.110.0100.00918.92
8.4.100.0120.00918.85
8.4.90.0120.00818.63
8.4.80.0120.00917.89
8.4.70.0060.00218.00
8.4.60.0130.00718.82
8.4.50.0100.01118.70
8.4.40.0060.01318.55
8.4.30.0030.01718.72
8.4.20.0120.00920.52
8.4.10.0030.01619.64
8.3.280.0140.00618.45
8.3.270.0140.00516.47
8.3.260.0120.00716.61
8.3.250.0050.00419.03
8.3.240.0080.01116.84
8.3.230.0120.00716.55
8.3.220.0150.00319.13
8.3.210.0100.00616.54
8.3.200.0050.00416.42
8.3.190.0100.01217.29
8.3.180.0110.00716.65
8.3.170.0160.00317.07
8.3.160.0110.00718.39
8.3.150.0060.00320.80
8.3.140.0060.00319.15
8.3.130.0080.00018.38
8.3.120.0090.00020.84
8.3.110.0060.00320.94
8.3.100.0000.01016.50
8.3.90.0000.00826.77
8.3.80.0000.01216.50
8.3.70.0140.00716.75
8.3.60.0070.01118.16
8.3.50.0110.00624.56
8.3.40.0170.00720.52
8.3.30.0100.00718.84
8.3.20.0090.00021.48
8.3.10.0040.00422.05
8.3.00.0040.00422.41
8.2.290.0100.00820.64
8.2.280.0120.00718.36
8.2.270.0110.00417.35
8.2.260.0050.00516.52
8.2.250.0050.00316.76
8.2.240.0130.00317.42
8.2.230.0030.00622.58
8.2.220.0080.00024.06
8.2.210.0080.00026.77
8.2.200.0090.00316.75
8.2.190.0150.00416.58
8.2.180.0070.01416.75
8.2.170.0110.01119.06
8.2.160.0130.00622.96
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0030.00526.16
8.2.120.0040.00419.95
8.2.110.0030.00622.07
8.2.100.0060.00617.78
8.2.90.0080.00017.88
8.2.80.0030.00618.96
8.2.70.0000.00818.03
8.2.60.0060.00317.75
8.2.50.0050.00317.55
8.2.40.0040.00417.75
8.2.30.0040.00418.02
8.2.20.0000.00718.09
8.2.10.0050.00219.20
8.2.00.0000.00719.26
8.1.330.0110.00822.11
8.1.320.0080.01016.31
8.1.310.0100.00716.88
8.1.300.0000.00818.41
8.1.290.0060.00330.84
8.1.280.0030.01325.92
8.1.270.0000.00822.18
8.1.260.0000.00826.35
8.1.250.0020.00528.09
8.1.240.0030.00619.28
8.1.230.0080.00317.89
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0040.00417.22
8.1.190.0030.00517.35
8.1.180.0060.00318.10
8.1.170.0050.00219.11
8.1.160.0000.00718.91
8.1.150.0040.00418.90
8.1.140.0000.00718.89
8.1.130.0000.00720.04
8.1.120.0000.00817.45
8.1.110.0050.00317.52
8.1.100.0000.00917.36
8.1.90.0050.00217.48
8.1.80.0000.00817.48
8.1.70.0030.00317.49
8.1.60.0030.00617.61
8.1.50.0000.00817.54
8.1.40.0070.00317.59
8.1.30.0030.00617.69
8.1.20.0030.00517.64
8.1.10.0030.00517.52
8.1.00.0040.00417.55
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0000.00818.46
8.0.270.0030.00317.93
8.0.260.0030.00623.57
8.0.250.0000.00717.00
8.0.240.0030.00316.84
8.0.230.0040.00416.91
8.0.220.0040.00416.91
8.0.210.0040.00416.80
8.0.200.0000.00816.98
8.0.190.0070.00016.86
8.0.180.0000.00816.93
8.0.170.0000.00816.98
8.0.160.0000.00816.91
8.0.150.0070.00016.73
8.0.140.0030.00616.79
8.0.130.0000.00613.42
8.0.120.0040.00416.88
8.0.110.0000.00716.79
8.0.100.0030.00516.84
8.0.90.0030.00616.79
8.0.80.0090.00616.89
8.0.70.0000.00716.90
8.0.60.0000.00716.71
8.0.50.0040.00416.93
8.0.30.0130.00917.26
8.0.20.0140.01016.91
8.0.10.0000.00717.10
8.0.00.0130.00616.52
7.4.330.0050.00015.55
7.4.320.0030.00316.52
7.4.300.0070.00016.61
7.4.290.0000.00716.55
7.4.280.0040.00416.62
7.4.270.0030.00316.52
7.4.260.0000.00513.30
7.4.250.0030.00316.59
7.4.240.0040.00416.52
7.4.230.0070.00016.59
7.4.220.0040.00416.52
7.4.210.0100.00716.63
7.4.200.0040.00416.40
7.4.130.0120.00516.49
7.4.120.0160.00316.67
7.4.110.0070.01116.33
7.4.100.0130.01016.56
7.4.90.0140.00316.54
7.4.80.0080.00919.39
7.4.70.0070.01016.41
7.4.60.0100.00716.39
7.4.50.0070.01016.50
7.4.40.0100.00616.45
7.4.30.0070.01116.54
7.4.20.0160.00316.41
7.4.10.0040.01316.27
7.4.00.0100.00716.58
7.3.330.0070.00016.26
7.3.320.0040.00413.20
7.3.310.0070.00016.24
7.3.300.0070.00016.34
7.3.290.0070.00816.34
7.3.260.0140.00816.53
7.3.240.0100.01016.43
7.3.230.0000.01716.37
7.3.210.0110.01216.27
7.3.200.0070.01016.69
7.3.190.0100.00716.34
7.3.180.0000.01916.56
7.3.170.0070.01116.29
7.3.160.0070.01016.45
7.3.150.0130.00616.36
7.3.140.0060.01416.26
7.3.130.0130.00916.54
7.3.120.0140.00516.34
7.3.110.0170.00316.51
7.3.100.0060.01516.31
7.3.90.0120.00916.35
7.3.80.0060.01216.28
7.3.70.0110.00616.39
7.3.60.0080.00816.52
7.3.50.0080.00816.33
7.3.40.0040.01216.33
7.3.30.0030.01716.50
7.3.20.0070.01018.19
7.3.10.0150.00518.11
7.3.00.0150.00418.17
7.2.330.0060.01116.59
7.2.320.0030.01316.46
7.2.310.0060.01216.79
7.2.300.0080.00916.91
7.2.290.0080.01216.87
7.2.280.0200.00016.58
7.2.270.0040.01416.77
7.2.260.0100.01016.47
7.2.250.0220.01216.76
7.2.240.0110.01116.38
7.2.230.0080.01116.64
7.2.220.0140.00716.66
7.2.210.0100.00716.64
7.2.200.0090.01516.58
7.2.190.0070.01416.66
7.2.180.0110.00716.75
7.2.170.0120.00616.57
7.2.160.0040.01316.71
7.2.150.0120.00718.37
7.2.140.0060.01218.58
7.2.130.0060.01518.46
7.2.120.0090.00918.59
7.2.110.0060.01218.38
7.2.100.0140.00518.40
7.2.90.0090.01218.32
7.2.80.0150.00918.32
7.2.70.0030.02018.56
7.2.60.0110.01118.52
7.2.50.0070.01418.29
7.2.40.0280.01716.58
7.2.30.0090.01418.41
7.2.20.0140.00618.36
7.2.10.0140.00718.62
7.2.00.0150.00618.44

preferences:
36.08 ms | 403 KiB | 5 Q