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 = 'n/a-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.60.0070.01116.50
8.3.50.0090.00821.93
8.3.40.0130.00618.71
8.3.30.0100.00719.08
8.3.20.0040.00420.09
8.3.10.0050.00323.71
8.3.00.0030.00819.02
8.2.180.0060.00918.31
8.2.170.0110.00322.96
8.2.160.0100.00720.35
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0000.00722.16
8.2.110.0100.00722.00
8.2.100.0110.00319.76
8.2.90.0040.00419.34
8.2.80.0050.00317.97
8.2.70.0040.00417.63
8.2.60.0040.00418.05
8.2.50.0000.00818.07
8.2.40.0040.00419.93
8.2.30.0030.00619.97
8.2.20.0040.00417.80
8.2.10.0040.00418.11
8.2.00.0030.00617.74
8.1.280.0070.00725.92
8.1.270.0040.00422.06
8.1.260.0060.00326.35
8.1.250.0070.00028.09
8.1.240.0090.00923.77
8.1.230.0080.00319.16
8.1.220.0050.00317.74
8.1.210.0030.00618.77
8.1.200.0040.00417.35
8.1.190.0000.00817.22
8.1.180.0100.00018.10
8.1.170.0000.00818.51
8.1.160.0040.00422.03
8.1.150.0000.00718.70
8.1.140.0080.00017.39
8.1.130.0000.00717.88
8.1.120.0040.00417.43
8.1.110.0040.00417.49
8.1.100.0040.00417.45
8.1.90.0070.00017.46
8.1.80.0070.00017.49
8.1.70.0000.00817.37
8.1.60.0050.00317.46
8.1.50.0050.00317.40
8.1.40.0040.00417.42
8.1.30.0050.00317.57
8.1.20.0000.00817.64
8.1.10.0070.00017.52
8.1.00.0080.00017.53
8.0.300.0030.00518.77
8.0.290.0040.00417.18
8.0.280.0070.00018.45
8.0.270.0030.00317.31
8.0.260.0080.00017.16
8.0.250.0000.00716.87
8.0.240.0000.00816.85
8.0.230.0070.00016.82
8.0.220.0030.00316.75
8.0.210.0000.00716.79
8.0.200.0080.00016.86
8.0.190.0000.00816.93
8.0.180.0000.00716.86
8.0.170.0040.00416.82
8.0.160.0040.00416.89
8.0.150.0030.00316.71
8.0.140.0050.00316.75
8.0.130.0070.00013.41
8.0.120.0040.00416.88
8.0.110.0040.00416.88
8.0.100.0070.00016.94
8.0.90.0030.00316.86
8.0.80.0080.00816.93
8.0.70.0050.00317.01
8.0.60.0040.00416.87
8.0.50.0000.00816.85
8.0.30.0090.01017.13
8.0.20.0120.00817.40
8.0.10.0000.00717.01
8.0.00.0100.00716.73
7.4.330.0030.00315.11
7.4.320.0040.00416.52
7.4.300.0070.00016.41
7.4.290.0030.00316.62
7.4.280.0030.00316.61
7.4.270.0040.00416.44
7.4.260.0000.00716.49
7.4.250.0080.00016.54
7.4.240.0030.00316.53
7.4.230.0030.00316.39
7.4.220.0120.00616.62
7.4.210.0070.00916.65
7.4.200.0000.00716.70
7.4.190.0000.00716.60
7.4.160.0090.00616.32
7.4.150.0070.01017.40
7.4.140.0080.01317.86
7.4.130.0100.01016.52
7.4.120.0060.01616.65
7.4.110.0080.00816.53
7.4.100.0160.00716.61
7.4.90.0060.01316.66
7.4.80.0060.01319.39
7.4.70.0110.00616.46
7.4.60.0120.00316.36
7.4.50.0000.00416.45
7.4.40.0110.01116.58
7.4.30.0030.01316.57
7.4.00.0060.00914.97
7.3.330.0000.00513.30
7.3.320.0030.00313.37
7.3.310.0000.00916.27
7.3.300.0000.00816.18
7.3.290.0060.01016.28
7.3.280.0080.01016.31
7.3.270.0080.00817.40
7.3.260.0150.00316.56
7.3.250.0090.01116.61
7.3.240.0120.00616.39
7.3.230.0110.00716.39
7.3.210.0110.00516.21
7.3.200.0100.01019.39
7.3.190.0070.01116.49
7.3.180.0120.00916.46
7.3.170.0060.01016.39
7.3.160.0080.00816.58
7.3.120.0090.00514.79
7.3.110.0110.00714.89
7.3.100.0070.00714.87
7.3.90.0070.00714.93
7.3.80.0100.00615.07
7.3.70.0060.00314.95
7.3.60.0060.00914.80
7.3.50.0070.00714.86
7.3.40.0070.01014.55
7.3.30.0000.00814.55
7.3.20.0080.00816.46
7.3.10.0100.00716.86
7.3.00.0030.00816.73
7.2.330.0090.00916.85
7.2.320.0100.00716.69
7.2.310.0090.00916.80
7.2.300.0130.00316.80
7.2.290.0030.02016.80
7.2.250.0130.00714.77
7.2.240.0100.00714.77
7.2.230.0030.01214.91
7.2.220.0030.00914.82
7.2.210.0030.01315.34
7.2.200.0000.01314.95
7.2.190.0060.00815.11
7.2.180.0030.00715.04
7.2.170.0100.00315.09
7.2.00.0000.01219.62
7.1.330.0060.01115.92
7.1.320.0000.01415.80
7.1.310.0070.00716.04
7.1.300.0040.00815.68
7.1.290.0060.00915.88
7.1.280.0050.00815.64
7.1.270.0090.00615.82
7.1.260.0040.01115.55
7.1.100.0090.00318.21
7.1.70.0040.01117.16
7.1.60.0060.01919.46
7.1.50.0160.00616.82
7.1.00.0070.06722.40
7.0.200.0000.01116.87
7.0.140.0070.06322.21
7.0.60.0000.09319.85
7.0.50.0100.06717.98
7.0.40.0000.05020.30
7.0.30.0230.04320.07
7.0.20.0230.06020.25
7.0.10.0070.06320.19
7.0.00.0030.07020.08
5.6.280.0070.09020.86
5.6.210.0030.04720.57
5.6.200.0100.07718.25
5.6.190.0030.08320.50
5.6.180.0130.04020.59
5.6.170.0230.04020.71
5.6.160.0200.06720.50
5.6.150.0070.04718.25
5.6.140.0030.08018.12
5.6.130.0130.07718.17
5.6.120.0070.07320.99
5.6.110.0100.06720.98
5.6.100.0130.05721.03
5.6.90.0030.09020.98
5.6.80.0030.03720.38
5.5.350.4300.03720.35
5.5.340.0130.07718.09
5.5.330.0030.05320.19
5.5.320.0270.07320.27
5.5.310.0270.05720.19
5.5.300.0100.08018.03
5.5.290.0100.08018.06
5.5.280.0100.05320.77
5.5.270.0130.03320.88
5.5.260.0100.07020.80
5.5.250.0100.05020.62
5.5.240.0000.03320.07
5.4.450.0230.05719.48
5.4.440.0370.04719.60
5.4.430.0130.06719.19
5.4.420.0230.05719.61
5.4.410.0200.05719.35
5.4.400.0270.04318.88
5.4.390.0230.06319.13
5.4.380.0200.07018.76
5.4.370.0200.04718.72
5.4.360.0100.05718.74
5.4.350.0070.06018.79
5.4.340.0230.04318.75
5.4.320.0090.03412.50
5.4.310.0110.04512.50
5.4.300.0100.03912.50
5.4.290.0060.05912.50
5.4.280.0040.03712.40
5.4.270.0070.03512.39
5.4.260.0040.04112.40
5.4.250.0100.03612.39
5.4.240.0060.03812.40
5.4.230.0110.03512.39
5.4.220.0030.04012.39
5.4.210.0080.03612.39
5.4.200.0090.03712.39
5.4.190.0080.03812.39
5.4.180.0070.03712.39
5.4.170.0070.03812.40
5.4.160.0070.03612.39
5.4.150.0080.04712.39
5.4.140.0040.04312.07
5.4.130.0060.03612.06
5.4.120.0060.03612.02
5.4.110.0100.03212.01
5.4.100.0090.03412.01
5.4.90.0100.03712.02
5.4.80.0090.04112.01
5.4.70.0080.04812.01
5.4.60.0080.04812.01
5.4.50.0060.03612.01
5.4.40.0050.03712.00
5.4.30.0060.05112.00
5.4.20.0070.03611.99
5.4.10.0100.03511.99
5.4.00.0090.03311.48
5.3.290.0080.03812.80
5.3.280.0070.03712.71
5.3.270.0090.03712.72
5.3.260.0080.03712.72
5.3.250.0060.03912.72
5.3.240.0070.04412.72
5.3.230.0080.03712.71
5.3.220.0060.03912.68
5.3.210.0100.03612.68
5.3.200.0050.03812.68
5.3.190.0070.03512.68
5.3.180.0060.03512.67
5.3.170.0060.03712.67
5.3.160.0050.03912.68
5.3.150.0050.03912.67
5.3.140.0040.03912.66
5.3.130.0070.03912.66
5.3.120.0060.03912.66
5.3.110.0070.03812.66
5.3.100.0090.03412.11
5.3.90.0040.03912.10
5.3.80.0060.03712.09
5.3.70.0070.03712.09
5.3.60.0040.04012.07
5.3.50.0060.03912.02
5.3.40.0050.04012.03
5.3.30.0140.03211.98
5.3.20.0060.03511.77
5.3.10.0060.03411.73
5.3.00.0070.03411.71
5.2.170.0060.0329.22
5.2.160.0040.0329.22
5.2.150.0040.0319.22
5.2.140.0050.0319.21
5.2.130.0060.0319.18
5.2.120.0100.0379.18
5.2.110.0050.0349.18
5.2.100.0030.0339.18
5.2.90.0070.0299.18
5.2.80.0080.0309.17
5.2.70.0070.0309.18
5.2.60.0060.0309.13
5.2.50.0060.0289.10
5.2.40.0060.0289.08
5.2.30.0040.0309.05
5.2.20.0040.0299.04
5.2.10.0070.0368.94
5.2.00.0070.0268.80
5.1.60.0020.0288.09
5.1.50.0070.0238.09
5.1.40.0070.0238.07
5.1.30.0080.0228.41
5.1.20.0060.0258.44
5.1.10.0020.0298.17
5.1.00.0050.0298.16
5.0.50.0030.0226.66
5.0.40.0020.0216.52
5.0.30.0030.0326.33
5.0.20.0040.0196.29
5.0.10.0050.0186.27
5.0.00.0030.0346.27
4.4.90.0050.0144.78
4.4.80.0060.0244.76
4.4.70.0030.0224.75
4.4.60.0040.0214.76
4.4.50.0050.0214.77
4.4.40.0040.0344.71
4.4.30.0020.0234.76
4.4.20.0060.0204.84
4.4.10.0040.0224.85
4.4.00.0030.0344.76
4.3.110.0050.0214.67
4.3.100.0040.0214.66
4.3.90.0030.0224.64
4.3.80.0030.0284.58
4.3.70.0050.0144.63
4.3.60.0020.0164.63
4.3.50.0020.0174.63
4.3.40.0040.0244.54
4.3.30.0040.0153.32
4.3.20.0030.0163.30
4.3.10.0040.0153.25
4.3.00.0070.0237.34

preferences:
54.43 ms | 401 KiB | 5 Q