Skip to content

Instantly share code, notes, and snippets.

@JenkinsDev
Created June 6, 2014 00:09
Show Gist options
  • Save JenkinsDev/6a2856b7bfdbf540de17 to your computer and use it in GitHub Desktop.
Save JenkinsDev/6a2856b7bfdbf540de17 to your computer and use it in GitHub Desktop.
Calculate Age (One Liner)
$age = floor((time() - strtotime($data_of_birth)) / 31556926);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment