3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * isTeamSizeOK method * * Method used to check that the number of competitors being registered for this team fall within the accepted ranges defined within the teams chosen level * * @param string $level_id This is the level_id selected for this competitor's team * @return mixed */ function isTeamSizeOK($level_id) { $data = array( array('field1' => 'value1', 'field2' => 'value2'), array('field1' => 'value1', 'field2' => 'value2'), array('field1' => 'value1', 'field2' => 'value2'), array('field1' => 'value1', 'field2' => 'value2') ); $number_of_competitors = count($data); // TODO verify that this contains the entire array of competitors being added to this team $team_size_range = '5-9'; $team_size_range_arr = explode('-', $team_size_range); if (stripos($team_size_range_arr[0], 'N/A') !== false) { return true; } if (stripos($team_size_range_arr[1], 'N/A') !== false) { $team_size_range_arr[1] = 1000; } if ($number_of_competitors >= $team_size_range_arr[0] && $number_of_competitors <= $team_size_range_arr[1]) { return true; } return false; } echo isTeamSizeOk(NULL);

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.70.0110.00416.63
8.3.60.0090.00616.38
8.3.50.0110.00522.03
8.3.40.0150.00618.83
8.3.30.0070.00719.09
8.3.20.0050.00220.35
8.3.10.0030.00523.45
8.3.00.0070.00319.26
8.2.180.0080.01116.75
8.2.170.0140.00022.96
8.2.160.0070.00720.57
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0020.00526.16
8.2.120.0080.00022.26
8.2.110.0030.00622.11
8.2.100.0040.00718.03
8.2.90.0000.00919.17
8.2.80.0080.00017.97
8.2.70.0040.00417.50
8.2.60.0040.00418.16
8.2.50.0000.00818.07
8.2.40.0050.00518.22
8.2.30.0050.00518.07
8.2.20.0040.00417.81
8.2.10.0040.00418.11
8.2.00.0040.00417.82
8.1.280.0120.00325.92
8.1.270.0080.00023.62
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0090.00023.79
8.1.230.0070.00419.08
8.1.220.0090.00017.80
8.1.210.0060.00318.77
8.1.200.0030.00617.23
8.1.190.0040.00417.36
8.1.180.0060.00319.01
8.1.170.0050.00318.48
8.1.160.0000.00722.02
8.1.150.0040.00418.50
8.1.140.0040.00417.42
8.1.130.0000.00717.75
8.1.120.0070.00017.49
8.1.110.0000.00817.46
8.1.100.0000.00717.35
8.1.90.0040.00417.43
8.1.80.0040.00317.40
8.1.70.0030.00517.41
8.1.60.0040.00417.49
8.1.50.0000.00817.48
8.1.40.0000.00717.55
8.1.30.0080.00017.55
8.1.20.0000.00717.59
8.1.10.0000.00917.57
8.1.00.0040.00417.51
8.0.300.0040.00418.77
8.0.290.0070.00017.18
8.0.280.0030.00318.36
8.0.270.0070.00017.21
8.0.260.0050.00217.31
8.0.250.0000.00716.99
8.0.240.0000.00716.96
8.0.230.0070.00016.95
8.0.220.0070.00016.89
8.0.210.0030.00416.88
8.0.200.0000.00816.82
8.0.190.0000.00716.95
8.0.180.0040.00416.80
8.0.170.0020.00516.90
8.0.160.0070.00016.80
8.0.150.0000.00716.86
8.0.140.0080.00016.86
8.0.130.0000.00613.28
8.0.120.0070.00016.83
8.0.110.0000.00716.80
8.0.100.0050.00216.87
8.0.90.0000.00716.88
8.0.80.0060.00916.88
8.0.70.0030.00516.91
8.0.60.0040.00416.92
8.0.50.0000.00716.91
8.0.30.0130.00617.01
8.0.20.0110.01117.40
8.0.10.0000.00717.07
8.0.00.0040.01316.66
7.4.330.0050.00015.00
7.4.320.0000.00716.64
7.4.300.0050.00316.45
7.4.290.0030.00316.61
7.4.280.0040.00416.64
7.4.270.0070.00016.62
7.4.260.0040.00416.47
7.4.250.0000.01016.48
7.4.240.0020.00516.44
7.4.230.0030.00316.61
7.4.220.0090.00916.52
7.4.210.0060.00916.65
7.4.200.0030.00316.60
7.4.190.0030.00316.47
7.4.160.0090.00616.57
7.4.150.0030.01417.40
7.4.140.0120.00517.86
7.4.130.0120.00916.49
7.4.120.0090.00916.52
7.4.110.0100.00716.58
7.4.100.0060.01216.69
7.4.90.0060.01316.34
7.4.80.0090.00919.39
7.4.70.0080.01116.52
7.4.60.0030.01316.46
7.4.50.0030.00316.42
7.4.40.0090.00616.61
7.4.30.0080.00816.49
7.4.00.0050.01314.84
7.3.330.0050.00013.38
7.3.320.0000.00513.23
7.3.310.0030.00316.45
7.3.300.0030.00316.34
7.3.290.0120.00316.27
7.3.280.0110.00616.35
7.3.270.0070.01017.40
7.3.260.0060.01216.36
7.3.250.0050.01516.47
7.3.240.0040.01216.61
7.3.230.0040.01216.39
7.3.210.0150.00416.38
7.3.200.0090.01219.39
7.3.190.0130.01016.67
7.3.180.0030.01316.49
7.3.170.0030.01416.61
7.3.160.0100.00716.50
7.3.120.0080.00914.89
7.3.110.0030.01514.80
7.3.100.0000.01914.88
7.3.90.0110.00314.96
7.3.80.0040.00814.98
7.3.70.0000.01014.68
7.3.60.0030.01414.78
7.3.50.0060.00314.92
7.3.40.0120.00014.48
7.3.30.0090.00614.63
7.3.20.0030.01016.54
7.3.10.0000.01416.50
7.3.00.0030.00716.50
7.2.330.0110.00616.71
7.2.320.0090.01316.75
7.2.310.0060.01016.64
7.2.300.0060.00916.72
7.2.290.0110.01316.41
7.2.250.0070.01314.92
7.2.240.0060.00615.25
7.2.230.0060.00915.02
7.2.220.0130.00015.26
7.2.210.0060.00615.01
7.2.200.0080.00015.10
7.2.190.0070.00714.88
7.2.180.0120.00314.93
7.2.170.0030.01215.31
7.2.00.0060.00319.55
7.1.330.0000.01516.00
7.1.320.0030.01015.74
7.1.310.0090.00615.62
7.1.300.0080.00015.91
7.1.290.0030.00615.70
7.1.280.0070.00715.74
7.1.270.0030.01015.55
7.1.260.0000.01215.93
7.1.200.0060.00915.49
7.1.100.0000.01018.27
7.1.70.0040.00817.30
7.1.60.0070.01719.46
7.1.50.0090.00916.80
7.1.00.0000.08022.37
7.0.200.0000.00716.58
7.0.140.0030.07022.01
7.0.60.0200.07319.85
7.0.50.0070.08017.87
7.0.40.0100.03720.27
7.0.30.0400.06720.32
7.0.20.0300.04020.26
7.0.10.0100.05320.06
7.0.00.0170.08020.07
5.6.280.0100.06721.11
5.6.210.0030.09320.73
5.6.200.0030.09018.33
5.6.190.0070.07320.61
5.6.180.0070.04320.47
5.6.170.0500.06720.50
5.6.160.0100.08320.57
5.6.150.0070.07318.18
5.6.140.0230.06318.11
5.6.130.0030.08018.15
5.6.120.0100.07721.01
5.6.110.0100.08721.15
5.6.100.0070.04321.05
5.6.90.0100.08721.13
5.6.80.0070.03720.29
5.5.350.3830.04720.43
5.5.340.0070.07717.96
5.5.330.0070.07320.45
5.5.320.0270.08020.30
5.5.310.0230.04320.37
5.5.300.0030.07718.07
5.5.290.0070.08318.04
5.5.280.0200.07320.95
5.5.270.0000.04720.76
5.5.260.0000.09020.75
5.5.250.0130.06020.61
5.5.240.0100.07720.18
5.4.450.0270.06019.61
5.4.440.0130.06319.31
5.4.430.0170.05319.58
5.4.420.0170.06019.33
5.4.410.0230.04719.48
5.4.400.0270.04719.15
5.4.390.0230.06019.15
5.4.380.0170.05718.53
5.4.370.0270.06018.46
5.4.360.0200.06018.54
5.4.350.0270.06318.80
5.4.340.0170.05318.79
5.4.320.0050.03812.50
5.4.310.0060.06612.50
5.4.300.0080.05112.50
5.4.290.0100.03812.50
5.4.280.0070.03512.40
5.4.270.0070.04212.40
5.4.260.0060.03812.40
5.4.250.0040.04212.39
5.4.240.0090.03612.40
5.4.230.0070.03712.39
5.4.220.0040.03912.39
5.4.210.0070.03612.39
5.4.200.0070.03912.39
5.4.190.0080.04212.39
5.4.180.0100.04012.39
5.4.170.0110.03712.39
5.4.160.0060.03812.39
5.4.150.0040.04012.38
5.4.140.0050.04512.07
5.4.130.0110.03212.06
5.4.120.0080.03412.02
5.4.110.0080.03612.02
5.4.100.0090.03612.01
5.4.90.0090.05912.01
5.4.80.0070.05512.01
5.4.70.0090.04312.01
5.4.60.0080.03812.01
5.4.50.0070.04412.00
5.4.40.0040.03812.00
5.4.30.0090.03911.99
5.4.20.0110.03511.99
5.4.10.0050.03711.99
5.4.00.0090.05211.48
5.3.290.0070.05612.80
5.3.280.0050.05512.71
5.3.270.0040.06012.72
5.3.260.0080.05612.72
5.3.250.0130.04812.72
5.3.240.0070.05512.72
5.3.230.0060.04212.71
5.3.220.0070.04112.68
5.3.210.0050.05012.68
5.3.200.0090.04612.68
5.3.190.0080.04212.67
5.3.180.0140.05612.67
5.3.170.0110.04512.67
5.3.160.0080.04212.67
5.3.150.0080.04112.67
5.3.140.0050.05612.66
5.3.130.0090.05412.66
5.3.120.0080.05712.66
5.3.110.0090.05612.66
5.3.100.0080.03712.12
5.3.90.0090.03612.10
5.3.80.0130.03312.09
5.3.70.0120.03812.09
5.3.60.0110.04112.08
5.3.50.0090.05312.03
5.3.40.0140.08812.03
5.3.30.0060.05911.98
5.3.20.0140.05711.77
5.3.10.0190.07111.73
5.3.00.0090.05911.72
5.2.170.0120.0489.22
5.2.160.0130.0489.22
5.2.150.0070.0369.22
5.2.140.0080.0369.22
5.2.130.0140.0409.18
5.2.120.0110.0459.18
5.2.110.0070.0369.18
5.2.100.0090.0349.18
5.2.90.0090.0359.18
5.2.80.0090.0419.17
5.2.70.0130.0499.18
5.2.60.0100.0519.13
5.2.50.0150.0499.09
5.2.40.0080.0329.08
5.2.30.0050.0869.05
5.2.20.0270.0659.03
5.2.10.0040.0488.95
5.2.00.0080.0378.81
5.1.60.0110.0358.09
5.1.50.0070.0348.09
5.1.40.0170.0528.07
5.1.30.0050.0308.42
5.1.20.0080.0278.44
5.1.10.0080.0608.17
5.1.00.0060.0258.16
5.0.50.0020.0266.66
5.0.40.0050.0236.51
5.0.30.0060.0326.32
5.0.20.0080.0196.29
5.0.10.0060.0276.27
5.0.00.0050.0386.26
4.4.90.0040.0204.78
4.4.80.0090.0164.76
4.4.70.0050.0224.75
4.4.60.0060.0194.76
4.4.50.0050.0214.77
4.4.40.0080.0304.71
4.4.30.0070.0184.76
4.4.20.0080.0224.85
4.4.10.0050.0234.85
4.4.00.0040.0434.75
4.3.110.0040.0204.67
4.3.100.0090.0334.66
4.3.90.0030.0174.64
4.3.80.0020.0284.58
4.3.70.0020.0194.63
4.3.60.0030.0174.63
4.3.50.0050.0154.63
4.3.40.0050.0244.54
4.3.30.0000.0213.32
4.3.20.0020.0183.30
4.3.10.0050.0153.25
4.3.00.0030.0237.34

preferences:
50.97 ms | 401 KiB | 5 Q