← All built-ins / time()

time()

time(...$args): int

Parameters

Takes no arguments.

Return value

Current Unix timestamp (int seconds since 1970-01-01 UTC).

Example

$t = time();
echo $t > 1700000000 ? "clock-ok" : "clock-suspicious";
clock-ok

See also

date()microtime()strtotime()