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-4'; $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.0120.00616.63
8.3.50.0110.00522.12
8.3.40.0090.00618.76
8.3.30.0110.00419.27
8.3.20.0000.00820.29
8.3.10.0050.00323.64
8.3.00.0040.00817.50
8.2.180.0100.01016.35
8.2.170.0090.00522.96
8.2.160.0140.00320.57
8.2.150.0000.00824.18
8.2.140.0050.00324.66
8.2.130.0070.00026.16
8.2.120.0050.00322.10
8.2.110.0030.00621.93
8.2.100.0090.00318.04
8.2.90.0040.00817.91
8.2.80.0030.00517.97
8.2.70.0040.00417.75
8.2.60.0050.00317.93
8.2.50.0000.00918.10
8.2.40.0040.00420.55
8.2.30.0050.00318.03
8.2.20.0080.00017.74
8.2.10.0040.00418.07
8.2.00.0040.00417.62
8.1.280.0120.00325.92
8.1.270.0040.00423.82
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0000.01723.96
8.1.230.0040.00822.61
8.1.220.0040.00417.77
8.1.210.0000.01118.77
8.1.200.0060.00317.25
8.1.190.0060.00317.35
8.1.180.0000.00818.10
8.1.170.0030.00618.59
8.1.160.0000.00722.06
8.1.150.0000.00818.58
8.1.140.0000.00717.45
8.1.130.0030.00317.82
8.1.120.0000.00717.34
8.1.110.0040.00417.53
8.1.100.0000.00717.50
8.1.90.0000.00717.41
8.1.80.0070.00017.46
8.1.70.0000.00717.42
8.1.60.0060.00317.57
8.1.50.0040.00417.39
8.1.40.0030.00617.38
8.1.30.0000.00817.55
8.1.20.0000.00817.65
8.1.10.0040.00417.58
8.1.00.0050.00317.44
8.0.300.0040.00422.00
8.0.290.0050.00216.75
8.0.280.0000.00718.43
8.0.270.0000.00717.26
8.0.260.0060.00017.22
8.0.250.0030.00316.96
8.0.240.0040.00416.91
8.0.230.0040.00416.77
8.0.220.0030.00316.73
8.0.210.0030.00316.82
8.0.200.0000.00716.78
8.0.190.0000.00816.77
8.0.180.0000.00716.74
8.0.170.0000.00716.97
8.0.160.0000.00816.89
8.0.150.0050.00316.73
8.0.140.0000.00716.80
8.0.130.0060.00013.33
8.0.120.0000.00716.75
8.0.110.0000.00716.86
8.0.100.0040.00416.93
8.0.90.0050.00216.73
8.0.80.0090.00616.86
8.0.70.0050.00316.94
8.0.60.0000.00716.74
8.0.50.0040.00416.69
8.0.30.0120.00717.14
8.0.20.0120.00617.40
8.0.10.0000.00716.84
8.0.00.0080.01116.71
7.4.330.0000.00515.16
7.4.320.0030.00316.60
7.4.300.0000.00716.52
7.4.290.0030.00316.53
7.4.280.0030.00316.59
7.4.270.0000.00716.53
7.4.260.0070.00016.49
7.4.250.0000.00816.51
7.4.240.0000.00716.50
7.4.230.0030.00316.56
7.4.220.0140.00316.54
7.4.210.0090.00616.66
7.4.200.0000.00716.58
7.4.190.0040.00416.51
7.4.160.0070.01016.47
7.4.150.0070.01017.40
7.4.140.0100.00717.86
7.4.130.0090.01216.41
7.4.120.0070.00916.55
7.4.110.0110.01516.48
7.4.100.0140.00316.46
7.4.90.0070.01016.54
7.4.80.0090.00919.39
7.4.70.0140.00416.39
7.4.60.0060.01016.43
7.4.50.0030.00616.37
7.4.40.0060.00916.26
7.4.30.0140.00316.38
7.4.00.0110.00615.10
7.3.330.0030.00313.30
7.3.320.0030.00313.36
7.3.310.0070.00016.31
7.3.300.0080.00016.24
7.3.290.0060.00916.27
7.3.280.0140.00416.32
7.3.270.0100.01317.40
7.3.260.0070.01116.23
7.3.250.0100.01016.52
7.3.240.0130.00316.42
7.3.230.0060.01016.47
7.3.210.0160.00616.49
7.3.200.0090.00919.39
7.3.190.0060.01316.31
7.3.180.0060.01016.45
7.3.170.0030.01416.39
7.3.160.0090.00616.45
7.3.120.0080.00814.98
7.3.110.0030.01415.28
7.3.100.0070.01015.28
7.3.90.0080.00415.28
7.3.80.0120.00315.28
7.3.70.0000.01315.28
7.3.60.0060.01015.28
7.3.50.0120.00315.28
7.3.40.0100.00315.28
7.3.30.0070.01015.28
7.3.20.0090.00316.41
7.3.10.0100.00716.77
7.3.00.0100.00716.86
7.2.330.0130.00716.85
7.2.320.0130.00516.67
7.2.310.0040.01416.71
7.2.300.0030.01316.63
7.2.290.0110.01216.56
7.2.250.0130.00315.28
7.2.240.0000.01615.28
7.2.230.0070.01015.28
7.2.220.0070.00415.28
7.2.210.0110.00315.28
7.2.200.0040.00715.28
7.2.190.0030.00615.28
7.2.180.0090.00315.28
7.2.170.0060.00915.28
7.2.80.0000.01016.54
7.2.60.0100.00316.78
7.2.00.0040.00819.37
7.1.330.0030.01315.64
7.1.320.0100.00315.94
7.1.310.0060.00615.96
7.1.300.0060.00615.74
7.1.290.0040.01115.84
7.1.280.0080.00415.60
7.1.270.0000.01115.85
7.1.260.0110.00315.82
7.1.200.0000.01315.89
7.1.100.0030.00918.16
7.1.70.0060.00616.93
7.1.60.0090.01619.46
7.1.50.0040.01117.05
7.1.00.0100.06722.57
7.0.200.0040.00416.89
7.0.140.0100.06722.21
7.0.60.0130.07719.94
7.0.50.0130.03317.88
7.0.40.0030.04320.11
7.0.30.0370.07020.21
7.0.20.0200.05320.18
7.0.10.0030.06720.33
7.0.00.0030.07020.11
5.6.280.0100.06721.14
5.6.210.0130.07720.63
5.6.200.0030.07318.27
5.6.190.0100.08020.46
5.6.180.0070.04320.48
5.6.170.0400.07320.39
5.6.160.0100.08020.45
5.6.150.0070.07318.29
5.6.140.0070.08018.21
5.6.130.0030.07318.17
5.6.120.0070.08321.12
5.6.110.0030.08321.00
5.6.100.0070.08320.96
5.6.90.0100.08020.98
5.6.80.0100.07320.43
5.5.350.4300.03720.41
5.5.340.0200.04017.98
5.5.330.0130.08020.37
5.5.320.0200.04720.34
5.5.310.0270.04720.33
5.5.300.0100.06018.01
5.5.290.0070.05018.03
5.5.280.0170.06720.85
5.5.270.0100.05020.96
5.5.260.0030.08320.75
5.5.250.0030.04320.68
5.5.240.0030.07720.25
5.4.450.0230.07719.45
5.4.440.0200.08019.63
5.4.430.0300.05019.46
5.4.420.0270.07319.55
5.4.410.0130.06319.58
5.4.400.0170.07719.15
5.4.390.0200.05719.15
5.4.380.0130.05718.75
5.4.370.0200.05018.52
5.4.360.0230.04718.80
5.4.350.0130.05318.73
5.4.340.0170.04718.45
5.4.320.0120.03212.50
5.4.310.0100.06212.50
5.4.300.0070.03612.50
5.4.290.0050.04112.50
5.4.280.0080.03312.39
5.4.270.0020.04012.40
5.4.260.0060.03712.40
5.4.250.0070.03512.40
5.4.240.0040.03712.40
5.4.230.0060.04012.39
5.4.220.0030.04312.39
5.4.210.0070.03412.39
5.4.200.0090.03512.39
5.4.190.0120.03012.39
5.4.180.0070.03612.39
5.4.170.0080.04012.39
5.4.160.0050.03712.39
5.4.150.0090.04612.39
5.4.140.0040.04212.07
5.4.130.0090.03312.06
5.4.120.0030.03912.02
5.4.110.0050.05412.01
5.4.100.0100.03612.01
5.4.90.0050.04012.01
5.4.80.0030.04112.02
5.4.70.0040.03812.00
5.4.60.0060.03612.01
5.4.50.0110.03212.00
5.4.40.0040.04412.00
5.4.30.0070.04112.00
5.4.20.0080.03712.00
5.4.10.0110.03911.99
5.4.00.0060.04511.48
5.3.290.0040.04112.80
5.3.280.0100.03912.71
5.3.270.0080.05412.72
5.3.260.0080.04312.72
5.3.250.0130.07112.72
5.3.240.0070.04812.72
5.3.230.0030.04712.71
5.3.220.0090.05012.68
5.3.210.0090.05012.68
5.3.200.0100.04512.68
5.3.190.0110.08112.68
5.3.180.0060.04112.68
5.3.170.0080.04712.67
5.3.160.0110.03912.67
5.3.150.0040.05712.67
5.3.140.0090.05812.66
5.3.130.0110.05912.66
5.3.120.0060.05912.66
5.3.110.0100.05412.66
5.3.100.0090.04912.12
5.3.90.0070.05312.10
5.3.80.0110.04612.09
5.3.70.0040.05312.10
5.3.60.0090.05012.07
5.3.50.0080.04112.03
5.3.40.0050.03912.02
5.3.30.0130.06911.98
5.3.20.0050.03811.77
5.3.10.0060.03511.73
5.3.00.0050.04311.71
5.2.170.0080.0289.22
5.2.160.0060.0299.22
5.2.150.0030.0339.22
5.2.140.0040.0319.22
5.2.130.0040.0299.18
5.2.120.0040.0299.18
5.2.110.0050.0299.18
5.2.100.0030.0329.18
5.2.90.0050.0289.18
5.2.80.0070.0289.18
5.2.70.0040.0359.17
5.2.60.0070.0319.13
5.2.50.0040.0339.10
5.2.40.0090.0249.07
5.2.30.0050.0329.05
5.2.20.0060.0279.04
5.2.10.0050.0318.94
5.2.00.0080.0328.80
5.1.60.0070.0278.09
5.1.50.0030.0328.09
5.1.40.0100.0248.07
5.1.30.0050.0308.42
5.1.20.0040.0428.44
5.1.10.0100.0578.16
5.1.00.0180.0568.17
5.0.50.0090.0456.65
5.0.40.0070.0306.52
5.0.30.0070.0326.33
5.0.20.0090.0336.29
5.0.10.0050.0316.27
5.0.00.0070.0406.26
4.4.90.0030.0194.78
4.4.80.0070.0144.76
4.4.70.0070.0214.76
4.4.60.0040.0184.75
4.4.50.0050.0184.77
4.4.40.0040.0294.71
4.4.30.0030.0174.76
4.4.20.0040.0294.84
4.4.10.0050.0174.85
4.4.00.0030.0294.76
4.3.110.0020.0194.67
4.3.100.0050.0174.66
4.3.90.0030.0184.64
4.3.80.0030.0294.58
4.3.70.0030.0164.63
4.3.60.0060.0144.63
4.3.50.0060.0164.63
4.3.40.0020.0304.54
4.3.30.0040.0373.32
4.3.20.0110.0443.30
4.3.10.0020.0383.25
4.3.00.0170.0307.34

preferences:
44.96 ms | 401 KiB | 5 Q