3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function validBirthDate($fecha,$arrData,$params){ if (isset($arrData['fecha_nacimiento'])) { $month = isset($arrData['mes']) && is_numeric($arrData['mes']) && !strstr($arrData['mes'], '.') ? (int)$arrData['mes'] : 0; $day = isset($arrData['dia']) && is_numeric($arrData['dia']) && !strstr($arrData['dia'], '.') ? (int)$arrData['dia'] : 0; $year = isset($arrData['anio']) && is_numeric($arrData['anio']) && !strstr($arrData['anio'], '.') ? (int)$arrData['anio'] : 0; return checkdate($month, $day, $year); }else{ return false; } } echo validBirthDate('', array('fecha_nacimiento'=>'123', 'mes'=>'1', 'dia'=>'1', 'anio'=>'1', false) ? 'valid' : 'invalid';
Output for 5.3.0 - 5.4.15
Parse error: syntax error, unexpected ';' in /in/iDc32 on line 16
Process exited with code 255.