Difference between specific time and current time [duplicate]
问题 This question already has answers here : How to get time difference in minutes in PHP (17 answers) Closed 18 days ago . Well i have a time in UNIX format. i need to find the difference between a specific time and current time. if difference is 5 minutes. do something. $sp_time = 1400325952;//Specific time $currentTime = //current time in UNIX format $difference = $currentTime - $sp_time; if($difference >= 5)//if difference is less than or equal to 5minutes { //DO SOME STUFF } EDIT : How to