Skip to content

Instantly share code, notes, and snippets.

@emmgfx
Created May 8, 2015 08:58
Show Gist options
  • Save emmgfx/3f75291d05752704f4ec to your computer and use it in GitHub Desktop.
Save emmgfx/3f75291d05752704f4ec to your computer and use it in GitHub Desktop.
Calculate age
$age = date_diff(date_create($bdate), date_create('now'))->y;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment