[PHP] Get the current Unix timestamp

Created on November 30, 2026

Call time() to get the current Unix timestamp. The result is an integer count of seconds elapsed since January 1, 1970 at 00:00 UTC.

<?php

$timestamp = time();
echo $timestamp . PHP_EOL;

Reference

PHP