Day Ago PHP Function — And Time Ago Variations

This is just a simple day difference function. I wrapped the solution detailed here on StackOverflow into a function:

These are all variations on a standard time ago function that will provide more detail than day difference or less detail as the day difference grows into the weeks, months and beyond. There is a different variation on this used on this site which I detail in this previous post:

Found on this StackOverflow thread: