W3docs

How to add 5 minutes to current datetime on php < 5.3

You can use the strtotime function in PHP to add a certain number of minutes to a date and time.

You can use the strtotime function in PHP to add a certain number of minutes to a date and time. For example, to add 5 minutes to the current date and time:

Example of using the strtotime function in PHP to add a certain number of minutes to a date and time

php— editable, runs on the server
Info

Watch a video course: Learn object oriented PHP

Here, time() gets the current timestamp, then we add 5 minutes (5 * 60 seconds) to the timestamp. Then, date function is used to format the timestamp in the desired format.