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-7'; $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.60.0150.00316.63
8.3.50.0080.00921.97
8.3.40.0150.00618.56
8.3.30.0120.00319.04
8.3.20.0050.00320.35
8.3.10.0080.00023.62
8.3.00.0110.00017.63
8.2.180.0040.01218.16
8.2.170.0100.01022.96
8.2.160.0070.00720.39
8.2.150.0040.00424.18
8.2.140.0030.00624.66
8.2.130.0040.00426.16
8.2.120.0070.00022.26
8.2.110.0100.00021.15
8.2.100.0090.00317.99
8.2.90.0040.00417.97
8.2.80.0080.00017.97
8.2.70.0040.00418.04
8.2.60.0000.00817.93
8.2.50.0040.00418.07
8.2.40.0040.00420.06
8.2.30.0000.00718.12
8.2.20.0060.00317.74
8.2.10.0000.00818.14
8.2.00.0000.00717.73
8.1.280.0120.00825.92
8.1.270.0030.00522.24
8.1.260.0030.00626.35
8.1.250.0080.00028.09
8.1.240.0070.00322.34
8.1.230.0040.00822.62
8.1.220.0040.00417.79
8.1.210.0040.00418.77
8.1.200.0030.00717.36
8.1.190.0000.00917.35
8.1.180.0040.00418.10
8.1.170.0080.00018.57
8.1.160.0060.00321.93
8.1.150.0030.00518.73
8.1.140.0040.00417.33
8.1.130.0070.00017.75
8.1.120.0050.00217.50
8.1.110.0040.00417.45
8.1.100.0040.00417.42
8.1.90.0040.00417.49
8.1.80.0000.00717.36
8.1.70.0000.00717.46
8.1.60.0050.00317.55
8.1.50.0030.00517.54
8.1.40.0040.00417.61
8.1.30.0030.00517.53
8.1.20.0000.00817.55
8.1.10.0000.00817.61
8.1.00.0050.00317.54
8.0.300.0000.00719.64
8.0.290.0000.00716.75
8.0.280.0030.00318.43
8.0.270.0030.00317.28
8.0.260.0060.00017.22
8.0.250.0000.00716.80
8.0.240.0030.00517.00
8.0.230.0070.00016.88
8.0.220.0000.00616.80
8.0.210.0030.00316.77
8.0.200.0030.00316.85
8.0.190.0000.00717.00
8.0.180.0040.00416.80
8.0.170.0000.00816.93
8.0.160.0070.00016.75
8.0.150.0040.00416.82
8.0.140.0040.00416.91
8.0.130.0050.00013.28
8.0.120.0090.00016.75
8.0.110.0020.00516.88
8.0.100.0040.00416.86
8.0.90.0000.00716.74
8.0.80.0070.01016.87
8.0.70.0000.00816.88
8.0.60.0000.00716.96
8.0.50.0040.00416.96
8.0.30.0120.00617.13
8.0.20.0080.01117.40
8.0.10.0050.00216.79
8.0.00.0110.01116.78
7.4.330.0000.00615.05
7.4.320.0040.00416.51
7.4.300.0000.00616.63
7.4.290.0000.00716.50
7.4.280.0030.00316.66
7.4.270.0000.00716.54
7.4.260.0060.00316.52
7.4.250.0030.00516.50
7.4.240.0020.00516.53
7.4.230.0030.00316.48
7.4.220.0090.00916.58
7.4.210.0030.01116.62
7.4.200.0000.00716.60
7.4.190.0030.00316.64
7.4.160.0060.01016.51
7.4.150.0110.00717.40
7.4.140.0070.01017.86
7.4.130.0080.01116.48
7.4.120.0090.01116.50
7.4.110.0180.00016.31
7.4.100.0090.01116.40
7.4.90.0110.00616.49
7.4.80.0040.01319.39
7.4.70.0170.00716.50
7.4.60.0160.00316.52
7.4.50.0050.00016.64
7.4.40.0150.00316.64
7.4.30.0030.01416.66
7.4.00.0100.00414.86
7.3.330.0030.00313.44
7.3.320.0030.00313.16
7.3.310.0060.00316.35
7.3.300.0060.00016.38
7.3.290.0030.01616.30
7.3.280.0060.01416.26
7.3.270.0160.00017.40
7.3.260.0090.00916.42
7.3.250.0130.00516.48
7.3.240.0140.00316.44
7.3.230.0070.01116.61
7.3.210.0100.00616.68
7.3.200.0140.00719.39
7.3.190.0140.00416.55
7.3.180.0090.01316.56
7.3.170.0040.01116.29
7.3.160.0080.00816.26
7.3.120.0130.00314.97
7.2.330.0210.00316.58
7.2.320.0070.01416.78
7.2.310.0100.01016.52
7.2.300.0090.01216.45
7.2.290.0070.01316.44
7.2.00.0040.00419.57
7.1.100.0030.01018.32
7.1.70.0030.00617.38
7.1.60.0060.01919.46
7.1.50.0140.01016.85
7.1.00.0000.08022.43
7.0.200.0030.00716.75
7.0.140.0030.07022.09
7.0.60.0070.08020.04
7.0.50.0000.06017.84
7.0.40.0030.04319.96
7.0.30.0270.04320.34
7.0.20.0270.08020.12
7.0.10.0070.04720.08
7.0.00.0100.05320.22
5.6.280.0030.07321.01
5.6.210.0070.03720.61
5.6.200.0130.07718.16
5.6.190.0070.07720.57
5.6.180.0030.04720.47
5.6.170.0330.07020.62
5.6.160.0070.04720.61
5.6.150.0070.03718.30
5.6.140.0000.04318.18
5.6.130.0100.08718.13
5.6.120.0130.07021.04
5.6.110.0100.08321.04
5.6.100.0130.08321.14
5.6.90.0300.06320.88
5.6.80.0030.08320.52
5.5.350.3800.04320.44
5.5.340.0100.06017.98
5.5.330.0000.09020.31
5.5.320.0230.05020.24
5.5.310.0400.05320.32
5.5.300.0130.07718.09
5.5.290.0130.07318.08
5.5.280.0100.05020.88
5.5.270.0030.07020.68
5.5.260.0070.08320.84
5.5.250.0100.03320.46
5.5.240.0100.06320.29
5.4.450.0130.07719.17
5.4.440.0270.07319.55
5.4.430.0230.05019.47
5.4.420.0330.07319.58
5.4.410.0270.07319.42
5.4.400.0330.04719.02
5.4.390.0230.07019.26
5.4.380.0170.07018.50
5.4.370.0170.04718.63
5.4.360.0130.05018.59
5.4.350.0200.04718.50
5.4.340.0130.05318.59
5.4.320.0090.04912.51
5.4.310.0050.04212.50
5.4.300.0080.04312.50
5.4.290.0080.04312.50
5.4.280.0080.04412.40
5.4.270.0080.04712.39
5.4.260.0080.05312.40
5.4.250.0040.05412.40
5.4.240.0110.05012.40
5.4.230.0060.04012.39
5.4.220.0050.03812.39
5.4.210.0060.04412.39
5.4.200.0060.03812.39
5.4.190.0060.03612.39
5.4.180.0060.03812.39
5.4.170.0060.03912.39
5.4.160.0070.03612.39
5.4.150.0080.03612.38
5.4.140.0090.03612.07
5.4.130.0110.04012.06
5.4.120.0060.04212.01
5.4.110.0060.03712.01
5.4.100.0050.04012.01
5.4.90.0090.04412.02
5.4.80.0090.04512.01
5.4.70.0030.03912.00
5.4.60.0120.03512.01
5.4.50.0120.04712.01
5.4.40.0070.05412.00
5.4.30.0140.04412.00
5.4.20.0090.05212.00
5.4.10.0050.05311.99
5.4.00.0060.05311.48
5.3.290.0090.03612.80
5.3.280.0100.06412.71
5.3.270.0070.05612.72
5.3.260.0050.05912.71
5.3.250.0080.05512.71
5.3.240.0130.05712.72
5.3.230.0150.05712.71
5.3.220.0060.05512.68
5.3.210.0080.05412.68
5.3.200.0090.05212.68
5.3.190.0040.05012.68
5.3.180.0070.03912.67
5.3.170.0060.04012.67
5.3.160.0100.04912.68
5.3.150.0100.06512.67
5.3.140.0060.06412.66
5.3.130.0110.05712.66
5.3.120.0100.05812.66
5.3.110.0060.04812.66
5.3.100.0090.04912.12
5.3.90.0110.05112.10
5.3.80.0070.03912.09
5.3.70.0090.05012.09
5.3.60.0140.06712.08
5.3.50.0110.04912.02
5.3.40.0140.04812.02
5.3.30.0090.05211.98
5.3.20.0080.04811.77
5.3.10.0110.03211.73
5.3.00.0080.03511.72
5.2.170.0030.0349.22
5.2.160.0050.0309.22
5.2.150.0040.0329.22
5.2.140.0050.0309.21
5.2.130.0040.0309.18
5.2.120.0040.0329.18
5.2.110.0040.0339.18
5.2.100.0090.0269.18
5.2.90.0060.0299.18
5.2.80.0090.0329.18
5.2.70.0060.0349.17
5.2.60.0030.0369.13
5.2.50.0080.0289.10
5.2.40.0060.0389.07
5.2.30.0050.0429.04
5.2.20.0060.0359.03
5.2.10.0040.0408.95
5.2.00.0090.0398.80
5.1.60.0090.0328.09
5.1.50.0080.0378.09
5.1.40.0080.0368.07
5.1.30.0110.0408.42
5.1.20.0050.0358.44
5.1.10.0020.0288.17
5.1.00.0040.0268.17
5.0.50.0030.0216.66
5.0.40.0020.0216.52
5.0.30.0030.0336.33
5.0.20.0060.0276.29
5.0.10.0040.0296.27
5.0.00.0050.0326.27
4.4.90.0020.0244.78
4.4.80.0030.0244.75
4.4.70.0040.0184.76
4.4.60.0020.0194.75
4.4.50.0030.0234.77
4.4.40.0050.0334.70
4.4.30.0060.0194.76
4.4.20.0030.0184.85
4.4.10.0030.0234.84
4.4.00.0050.0354.76
4.3.110.0020.0234.67
4.3.100.0050.0144.66
4.3.90.0040.0154.63
4.3.80.0020.0284.58
4.3.70.0060.0124.63
4.3.60.0030.0154.63
4.3.50.0040.0144.63
4.3.40.0010.0304.54
4.3.30.0020.0163.32
4.3.20.0040.0143.29
4.3.10.0020.0153.25
4.3.00.0030.0307.34

preferences:
47.45 ms | 401 KiB | 5 Q