Simple method for calculating Age from dob: $_age = floor((time() - strtotime('1986-09-16')) / 31556926); 31556926 is the number of seconds in a year.
function get_age($birthday='1994-02-14'){
$date = new DateTime($birthday);
$now = new DateTime();
$interval = $now->diff($date);
return $interval->y;
}