3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php { function ageChange( $day = substr($birth_date, 8, 2); $month =substr($birth_date, 5, 2); $year = substr($birth_date, 0, 4); $year_diff = date("Y") - $year; $month_diff = date("m") - $month; $day_diff = date("d") - $day; if ($day_diff < 0 && $month_diff==0){$year_diff--;} if ($day_diff < 0 && $month_diff < 0){$year_diff--;} return $year_diff; ) } //Call the age function ageChange();
Output for 5.3.0 - 5.5.9
Parse error: syntax error, unexpected '(', expecting ')' in /in/l2HHM on line 5
Process exited with code 255.