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 = '0'; $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.13.2, 7.0.0 - 7.1.0
Notice: Use of undefined constant male - assumed 'male' in /in/5LjYF on line 19