3v4l.org

run code in 200+ 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 7.2.0 - 7.2.6
Warning: Use of undefined constant male - assumed 'male' (this will throw an Error in a future version of PHP) in /in/5LjYF on line 19
Output for 4.3.0 - 7.1.20
Notice: Use of undefined constant male - assumed 'male' in /in/5LjYF on line 19