To calculate the remainder of a subscription time in PHP we need three items: the end date from the future in timestamp format, the current date in timestamp format, and a function to convert the difference between the two from seconds into days, months and maybe even years.