3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getLengthOfMissingArray($arrayOfArrays) { if(! is_array($arrayOfArrays)) { return 0; } $values = array_map(function($array) { return count($array); }, $arrayOfArrays); if(count($values) == 0) { return 0; } for($i = min($values); $i <= max($values); $i++) { if($key = array_search($i, $values) === false) { return $i; } } return 0; } echo getLengthOfMissingArray([[35,37],[27,4,46,38],[29,37,45,31,33,33],[],[20,8,47,15,48,10,10],[24],[31,32,31,24,21]]);

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.40.0070.00718.63
8.3.30.0120.00318.47
8.3.20.0000.00820.38
8.3.10.0050.00323.66
8.3.00.0040.00420.89
8.2.170.0100.01022.96
8.2.160.0070.00722.13
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0020.00522.19
8.2.120.0080.00026.35
8.2.110.0000.01122.12
8.2.100.0080.00317.91
8.2.90.0080.00019.40
8.2.80.0040.00417.97
8.2.70.0030.00517.49
8.2.60.0090.00017.93
8.2.50.0110.00018.10
8.2.40.0000.00822.15
8.2.30.0000.00720.93
8.2.20.0050.00217.94
8.2.10.0000.00717.95
8.2.00.0070.00017.97
8.1.270.0060.00323.79
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0040.00423.92
8.1.230.0040.00722.13
8.1.220.0090.00017.74
8.1.210.0030.00618.77
8.1.200.0000.01017.35
8.1.190.0000.00817.23
8.1.180.0040.00418.10
8.1.170.0000.00918.55
8.1.160.0070.00019.06
8.1.150.0000.00818.84
8.1.140.0050.00219.46
8.1.130.0000.00718.78
8.1.120.0000.00817.46
8.1.110.0070.00017.39
8.1.100.0000.00817.45
8.1.90.0000.00717.38
8.1.80.0000.00717.36
8.1.70.0000.00717.49
8.1.60.0040.00417.57
8.1.50.0040.00417.53
8.1.40.0000.01017.48
8.1.30.0040.00417.55
8.1.20.0040.00417.54
8.1.10.0040.00417.54
8.1.00.0030.00617.46
8.0.300.0030.00518.77
8.0.290.0000.00716.75
8.0.280.0000.00718.43
8.0.270.0000.00717.27
8.0.260.0030.00316.90
8.0.250.0070.00016.95
8.0.240.0040.00416.87
8.0.230.0000.00716.92
8.0.220.0020.00516.89
8.0.210.0000.00716.76
8.0.200.0000.00716.92
8.0.190.0000.00816.96
8.0.180.0000.00716.93
8.0.170.0040.00316.85
8.0.160.0050.00316.84
8.0.150.0070.00016.86
8.0.140.0080.00416.87
8.0.130.0030.00513.28
8.0.120.0020.00516.90
8.0.110.0000.00716.79
8.0.100.0000.00716.75
8.0.90.0080.00016.86
8.0.80.0040.01116.87
8.0.70.0040.00416.78
8.0.60.0000.00716.86
8.0.50.0000.00716.84
8.0.30.0120.00616.85
8.0.20.0100.01017.40
8.0.10.0030.00516.97
8.0.00.0070.01017.00
7.4.330.0030.00315.55
7.4.320.0050.00316.52
7.4.300.0070.00016.36
7.4.290.0000.00716.59
7.4.280.0030.00616.61
7.4.270.0060.00016.61
7.4.260.0000.00716.48
7.4.250.0000.00716.38
7.4.240.0000.00716.42
7.4.230.0040.00416.63
7.4.220.0110.00816.60
7.4.210.0090.00616.42
7.4.200.0000.00716.71
7.4.160.0120.00716.54
7.4.150.0110.00817.40
7.4.140.0130.00617.86
7.4.130.0100.00916.64
7.4.120.0120.00716.49
7.4.110.0130.01016.61
7.4.100.0060.01316.63
7.4.90.0060.01016.49
7.4.80.0100.01319.39
7.4.70.0060.01316.64
7.4.60.0070.01116.63
7.4.50.0070.01116.52
7.4.40.0060.01016.43
7.4.30.0120.00916.57
7.4.00.0060.00914.83
7.3.330.0030.00313.17
7.3.320.0020.00213.17
7.3.310.0050.00216.30
7.3.300.0040.00416.23
7.3.290.0080.00816.30
7.3.280.0080.00816.28
7.3.270.0130.01317.40
7.3.260.0100.00816.58
7.3.250.0170.00316.50
7.3.240.0130.00716.38
7.3.230.0120.00616.39
7.3.210.0060.01016.60
7.3.200.0150.00316.44
7.3.190.0060.01016.51
7.3.180.0130.00316.33
7.3.170.0060.01516.46
7.3.160.0120.01016.38
7.3.10.0040.00816.75
7.3.00.0090.00316.82
7.2.330.0070.01016.66
7.2.320.0070.01016.52
7.2.310.0090.00916.50
7.2.300.0080.00816.46
7.2.290.0070.01116.63
7.2.130.0070.00717.14
7.2.120.0030.01216.96
7.2.110.0040.01116.89
7.2.100.0090.00916.87
7.2.90.0000.01616.85
7.2.80.0040.01117.01
7.2.70.0100.00716.79
7.2.60.0100.00716.86
7.2.50.0040.00817.05
7.2.40.0060.00916.78
7.2.30.0070.00717.13
7.2.20.0090.00617.00
7.2.10.0030.00616.69
7.2.00.0000.01218.24
7.1.250.0030.01015.88
7.1.100.1160.00416.24
7.1.70.0100.01017.30
7.1.60.0500.01033.02
7.1.50.0400.02033.07
7.1.40.0470.01732.79
7.1.30.0470.01032.63
7.1.20.0470.01332.78
7.1.10.0300.01714.70
7.1.00.0400.00315.07
7.0.200.0400.00714.71
7.0.190.0330.01015.07
7.0.180.0470.01314.53
7.0.170.0300.01014.39
7.0.160.0300.01014.45
7.0.150.0530.00714.42
7.0.140.0470.01714.44
7.0.130.0330.01314.76
7.0.120.0400.00714.49
7.0.110.0330.01014.61
7.0.100.0270.01714.53
7.0.90.0300.01714.51
7.0.80.0430.01014.57
7.0.70.0370.01014.63
7.0.60.0300.01314.20
7.0.50.0370.01014.63
7.0.40.0430.01714.80
7.0.30.0500.00314.61
7.0.20.0330.01014.57
7.0.10.0300.01014.49
7.0.00.0430.00314.74

preferences:
38.04 ms | 400 KiB | 5 Q