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);
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
1
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: stripos() in /in/mAg4M on line 23
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4
Fatal error: Call to undefined function: stripos() in /in/mAg4M on line 23
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: stripos() in /in/mAg4M on line 23

preferences:
212.12 ms | 401 KiB | 337 Q