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 = '1-3'; $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.40.0060.00918.75
8.3.30.0030.01019.09
8.3.20.0040.00420.16
8.3.10.0070.00023.46
8.3.00.0100.00017.50
8.2.170.0100.00322.96
8.2.160.0070.00720.47
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0000.00726.16
8.2.120.0000.00722.31
8.2.110.0030.00619.39
8.2.100.0040.00719.95
8.2.90.0000.00819.21
8.2.80.0000.00917.97
8.2.70.0000.00817.75
8.2.60.0040.00417.93
8.2.50.0040.00418.07
8.2.40.0000.00819.96
8.2.30.0000.00818.18
8.2.20.0040.00417.75
8.2.10.0000.00818.23
8.2.00.0000.00817.65
8.1.270.0070.00722.18
8.1.260.0070.00426.35
8.1.250.0020.00528.09
8.1.240.0040.00420.91
8.1.230.0060.00619.09
8.1.220.0040.00417.79
8.1.210.0080.00018.77
8.1.200.0070.00317.35
8.1.190.0000.00817.00
8.1.180.0100.00018.10
8.1.170.0040.00418.65
8.1.160.0050.00321.92
8.1.150.0040.00418.56
8.1.140.0000.00717.45
8.1.130.0070.00017.87
8.1.120.0040.00417.50
8.1.110.0070.00017.34
8.1.100.0040.00417.45
8.1.90.0000.00717.49
8.1.80.0040.00417.52
8.1.70.0070.00017.35
8.1.60.0000.00917.59
8.1.50.0030.00517.54
8.1.40.0060.00317.42
8.1.30.0000.00817.54
8.1.20.0000.00817.69
8.1.10.0080.00017.55
8.1.00.0040.00417.37
8.0.300.0070.00018.77
8.0.290.0070.00017.04
8.0.280.0030.00318.48
8.0.270.0040.00417.25
8.0.260.0030.00317.18
8.0.250.0060.00016.86
8.0.240.0060.00316.85
8.0.230.0030.00317.02
8.0.220.0000.00716.90
8.0.210.0080.00016.86
8.0.200.0060.00016.99
8.0.190.0040.00416.79
8.0.180.0070.00016.90
8.0.170.0040.00416.76
8.0.160.0030.00416.92
8.0.150.0030.00316.87
8.0.140.0000.00816.86
8.0.130.0030.00313.31
8.0.120.0030.00516.78
8.0.110.0040.00416.82
8.0.100.0050.00316.95
8.0.90.0000.00716.71
8.0.80.0120.00316.92
8.0.70.0000.00816.79
8.0.60.0030.00516.96
8.0.50.0000.00816.95
8.0.30.0120.00617.01
8.0.20.0030.01517.40
8.0.10.0000.00716.82
8.0.00.0120.00716.66
7.4.330.0030.00315.13
7.4.320.0000.00616.49
7.4.300.0060.00016.56
7.4.290.0000.00716.49
7.4.280.0040.00316.48
7.4.270.0030.00316.61
7.4.260.0030.00316.38
7.4.250.0060.00316.59
7.4.240.0030.00416.55
7.4.230.0030.00316.70
7.4.220.0030.01516.43
7.4.210.0070.00716.53
7.4.200.0080.00016.59
7.4.190.0000.00716.52
7.4.160.0060.00916.69
7.4.150.0000.01617.40
7.4.140.0110.00717.86
7.4.130.0100.01116.49
7.4.120.0090.00916.47
7.4.110.0120.00616.26
7.4.100.0070.01016.55
7.4.90.0110.00516.57
7.4.80.0100.01019.39
7.4.70.0080.01216.44
7.4.60.0150.00316.50
7.4.50.0060.00316.52
7.4.40.0100.00716.69
7.4.30.0060.01016.44
7.4.10.0120.00614.68
7.4.00.0050.01015.08
7.3.330.0000.00513.33
7.3.320.0050.00013.28
7.3.310.0000.00716.18
7.3.300.0030.00316.37
7.3.290.0100.00716.32
7.3.280.0080.01016.29
7.3.270.0070.01317.40
7.3.260.0070.01116.43
7.3.250.0060.01516.54
7.3.240.0100.00616.63
7.3.230.0130.00316.39
7.3.210.0030.01316.30
7.3.200.0060.01619.39
7.3.190.0130.00916.66
7.3.180.0160.00616.38
7.3.170.0150.00316.45
7.3.160.0110.00416.35
7.3.130.0000.01714.60
7.3.120.0070.00914.97
7.3.110.0100.00614.92
7.3.100.0080.00515.03
7.3.90.0070.00714.93
7.3.80.0090.00814.78
7.3.70.0020.01314.76
7.3.60.0050.00714.81
7.3.50.0080.00614.75
7.3.40.0060.00814.99
7.3.30.0070.00514.83
7.3.20.0070.00916.66
7.3.10.0050.00816.72
7.3.00.0060.00916.78
7.2.330.0170.00716.39
7.2.320.0170.00916.71
7.2.310.0130.00316.70
7.2.300.0120.00616.82
7.2.290.0060.01316.42
7.2.260.0070.00715.19
7.2.250.0100.01015.19
7.2.240.0020.01115.29
7.2.230.0040.01415.17
7.2.220.0090.00615.11
7.2.210.0060.00814.78
7.2.200.0040.00915.15
7.2.190.0070.00815.13
7.2.180.0060.00715.07
7.2.170.0090.00315.01
7.2.160.0040.00715.00
7.2.150.0060.00816.79
7.2.140.0070.01017.01
7.2.130.0020.01216.97
7.2.120.0100.00517.01
7.2.110.0030.01316.93
7.2.100.0080.00616.90
7.2.90.0030.01216.87
7.2.80.0070.00716.95
7.2.70.0080.01016.87
7.2.60.0070.00716.91
7.2.50.0080.00717.09
7.2.40.0010.01017.02
7.2.30.0070.00716.99
7.2.20.0040.01016.93
7.2.10.0110.00316.91
7.2.00.0090.00917.83
7.1.330.0080.00515.93
7.1.320.0060.00815.92
7.1.310.0030.01116.09
7.1.300.0070.00615.63
7.1.290.0050.00715.86
7.1.280.0070.00715.71
7.1.270.0100.00515.89
7.1.260.0050.00615.89
7.1.250.0020.01015.81
7.1.240.0070.00315.86
7.1.230.0070.00715.91
7.1.220.0030.01015.86
7.1.210.0050.00515.82
7.1.200.0030.01015.90
7.1.190.0000.01015.84
7.1.180.0060.00616.00
7.1.170.0070.00715.95
7.1.160.0000.01315.76
7.1.150.0040.00415.69
7.1.140.0100.00315.56
7.1.130.0080.00015.72
7.1.120.0040.01115.83
7.1.110.0000.00915.91
7.1.100.0040.00517.15
7.1.90.0030.00615.80
7.1.80.0090.00616.07
7.1.70.0030.00716.44
7.1.60.0110.00817.54
7.1.50.0100.00816.33
7.1.40.0030.01015.75
7.1.30.0040.01115.63
7.1.20.0030.00715.78
7.1.10.0100.00315.52
7.1.00.0050.04019.15
7.0.330.0000.01115.61
7.0.320.0060.00615.57
7.0.310.0060.00315.55
7.0.300.0090.00315.45
7.0.290.0070.00715.49
7.0.280.0060.00315.38
7.0.270.0040.00815.35
7.0.260.0040.01115.01
7.0.250.0030.01015.30
7.0.240.0100.00315.24
7.0.230.0060.00615.64
7.0.220.0040.00415.44
7.0.210.0030.00715.64
7.0.200.0030.00716.05
7.0.190.0000.01015.35
7.0.180.0000.01215.16
7.0.170.0030.01015.49
7.0.160.0040.00715.48
7.0.150.0120.00415.49
7.0.140.0040.03918.72
7.0.130.0020.01215.45
7.0.120.0030.01315.40
7.0.110.0090.00615.32
7.0.100.0110.00015.61
7.0.90.0070.00715.35
7.0.80.0040.01115.51
7.0.70.0040.00815.25
7.0.60.0060.04618.60
7.0.50.0060.03616.60
7.0.40.0020.02616.78
7.0.30.0110.03116.95
7.0.20.0220.03016.80
7.0.10.0050.02516.85
7.0.00.0050.03816.80
5.6.400.0000.01314.17
5.6.390.0000.01114.34
5.6.380.0090.00614.41
5.6.370.0030.01014.51
5.6.360.0030.00614.41
5.6.350.0070.00714.49
5.6.340.0050.00514.40
5.6.330.0060.00314.77
5.6.320.0000.01214.61
5.6.310.0030.01014.27
5.6.300.0040.00714.57
5.6.290.0000.01114.64
5.6.280.0100.03717.75
5.6.270.0050.00514.62
5.6.260.0040.00414.28
5.6.250.0040.00414.05
5.6.240.0040.00714.30
5.6.230.0070.01014.43
5.6.220.0060.00614.32
5.6.210.0030.04717.49
5.6.200.0040.03416.28
5.6.190.0070.04017.37
5.6.180.0080.02517.39
5.6.170.0270.03717.57
5.6.160.0070.04617.40
5.6.150.0090.03516.36
5.6.140.0100.03216.29
5.6.130.0070.04316.17
5.6.120.0070.04117.83
5.6.110.0100.04517.76
5.6.100.0120.04017.63
5.6.90.0050.03317.69
5.6.80.0110.04117.34
5.6.70.0030.00814.09
5.6.60.0080.00314.53
5.6.50.0040.01214.62
5.6.40.0090.00614.38
5.6.30.0090.00314.59
5.6.20.0040.00414.38
5.6.10.0100.00314.41
5.6.00.0040.00414.27
5.5.380.0060.00914.40
5.5.370.0070.00714.11
5.5.360.0030.00614.34
5.5.350.2170.02517.32
5.5.340.0000.02716.20
5.5.330.0050.03017.35
5.5.320.0210.04517.38
5.5.310.0150.03717.51
5.5.300.0090.04016.23
5.5.290.0130.03116.21
5.5.280.0020.04417.68
5.5.270.0080.04717.47
5.5.260.0030.02317.57
5.5.250.0070.04217.53
5.5.240.0120.04317.32
5.5.230.0000.01514.30
5.5.220.0040.01114.39
5.5.210.0050.00514.10
5.5.200.0030.00613.93
5.5.190.0100.00014.12
5.5.180.0000.01114.08
5.5.170.0000.00914.00
5.5.160.0030.00914.38
5.5.150.0120.00314.26
5.5.140.0100.00314.18
5.5.130.0030.00913.86
5.5.120.0000.01214.32
5.5.110.0040.00714.04
5.5.100.0070.00714.40
5.5.90.0000.00914.25
5.5.80.0070.00714.23
5.5.70.0030.00614.19
5.5.60.0030.01014.36
5.5.50.0040.00813.86
5.5.40.0120.00314.02
5.5.30.0070.01014.35
5.5.20.0130.00314.51
5.5.10.0070.01014.47
5.5.00.0000.01414.59
5.4.450.0130.03315.20
5.4.440.0200.03215.35
5.4.430.0140.03715.12
5.4.420.0130.03415.36
5.4.410.0130.03115.11
5.4.400.0130.03515.25
5.4.390.0120.03214.97
5.4.380.0090.03214.91
5.4.370.0100.02814.71
5.4.360.0080.03014.85
5.4.350.0100.03014.79
5.4.340.0060.03314.84
5.4.330.0040.00411.04
5.4.320.0070.02011.88
5.4.310.0020.02711.75
5.4.300.0060.02111.80
5.4.290.0040.02611.84
5.4.280.0070.01811.84
5.4.270.0060.02111.86
5.4.260.0040.03011.71
5.4.250.0100.02611.84
5.4.240.0060.03111.88
5.4.230.0090.02711.83
5.4.220.0050.03011.74
5.4.210.0070.02711.73
5.4.200.0060.02411.74
5.4.190.0040.02611.80
5.4.180.0030.02411.68
5.4.170.0040.02711.58
5.4.160.0050.02911.56
5.4.150.0080.02011.56
5.4.140.0020.02611.63
5.4.130.0080.01911.59
5.4.120.0040.02111.41
5.4.110.0060.02111.62
5.4.100.0060.01911.70
5.4.90.0040.02411.40
5.4.80.0090.01911.38
5.4.70.0050.02511.63
5.4.60.0080.02811.48
5.4.50.0090.03411.55
5.4.40.0090.02711.59
5.4.30.0090.01811.64
5.4.20.0060.02811.44
5.4.10.0050.02411.54
5.4.00.0070.02811.21
5.3.290.0060.02811.72
5.3.280.0040.03111.66
5.3.270.0070.02811.67
5.3.260.0070.02511.66
5.3.250.0040.02811.52
5.3.240.0040.02211.60
5.3.230.0080.02211.56
5.3.220.0060.02211.50
5.3.210.0050.02511.64
5.3.200.0040.02411.58
5.3.190.0040.02211.63
5.3.180.0040.02411.70
5.3.170.0080.02011.67
5.3.160.0090.01711.61
5.3.150.0070.03011.70
5.3.140.0100.02711.61
5.3.130.0090.02611.60
5.3.120.0050.02211.63
5.3.110.0050.02311.61
5.3.100.0050.02611.39
5.3.90.0040.02311.40
5.3.80.0070.02011.30
5.3.70.0040.02411.28
5.3.60.0030.02411.37
5.3.50.0040.02211.32
5.3.40.0070.01911.30
5.3.30.0030.02111.24
5.3.20.0050.02111.20
5.3.10.0040.02211.07
5.3.00.0040.02011.04
5.2.170.0030.0329.22
5.2.160.0040.0299.22
5.2.150.0060.0299.22
5.2.140.0070.0319.22
5.2.130.0060.0299.18
5.2.120.0080.0259.18
5.2.110.0050.0289.18
5.2.100.0060.0299.18
5.2.90.0070.0279.18
5.2.80.0060.0319.17
5.2.70.0080.0309.17
5.2.60.0050.0319.13
5.2.50.0050.0309.10
5.2.40.0050.0309.07
5.2.30.0060.0329.05
5.2.20.0050.0309.03
5.2.10.0020.0308.94
5.2.00.0040.0308.80
5.1.60.0050.0248.09
5.1.50.0030.0268.09
5.1.40.0040.0248.07
5.1.30.0050.0328.42
5.1.20.0050.0298.44
5.1.10.0030.0298.17
5.1.00.0040.0278.17
5.0.50.0020.0236.66
5.0.40.0040.0196.51
5.0.30.0040.0326.32
5.0.20.0040.0186.29
5.0.10.0020.0216.27
5.0.00.0020.0326.26
4.4.90.0010.0254.78
4.4.80.0040.0224.75
4.4.70.0010.0184.75
4.4.60.0020.0164.75
4.4.50.0030.0154.77
4.4.40.0050.0224.71
4.4.30.0010.0174.76
4.4.20.0020.0164.84
4.4.10.0010.0184.85
4.4.00.0020.0264.76
4.3.110.0030.0154.67
4.3.100.0030.0144.66
4.3.90.0020.0154.63
4.3.80.0030.0244.58
4.3.70.0030.0144.63
4.3.60.0030.0144.63
4.3.50.0020.0164.63
4.3.40.0020.0244.54
4.3.30.0030.0163.32
4.3.20.0020.0173.30
4.3.10.0010.0173.25
4.3.00.0070.0277.34

preferences:
42.61 ms | 400 KiB | 5 Q