Skip to content

Instantly share code, notes, and snippets.

@katdowns
Created July 3, 2012 04:34
Show Gist options
  • Save katdowns/3037731 to your computer and use it in GitHub Desktop.
Save katdowns/3037731 to your computer and use it in GitHub Desktop.
Get age from birthday
$birthday = $year.'-'.$month.'-'.$day;
$age = date_diff(date_create($birthday), date_create('now'))->y;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment