3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php /** * sexInList method * * Method to return a sex inlist array for the chosen team level for the dynamically created sex validation rule. * * @param string $level_id * @return array */ function sexInList($level_id) { $male = '1'; $female = '1'; if ($male && $female) { return array('M', 'F'); } if ($male && !$female) { return array('M'); } if ($female && !$male) { return array('F'); } } print_r(sexInList(null));
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [0] => M [1] => F )