How to get the current UNIX timestamp using PHP

9 sec read

UNIX TIMESTAMPIs the time measured in seconds since the start of the Unix epoch “1 January 1970”

Use the PHP time function as per example below

echo time(); //Will print out the current timestamp
//OUTPUT: 1285365600

To read more about the time function click here

Last Updated On March 22, 2018

Leave a Reply

Notify of