PHP.nl

time

time

Return current Unix timestamp

int **time**

Returns the current time measured in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT).

Opmerking: > Unix timestamps do not contain any information with regards to any local timezone. It is recommended to use the class for handling date and time information in order to avoid the pitfalls that come with just Unix timestamps. DateTimeImmutable

Returns the current timestamp.

Voorbeeld: example

<?php
echo 'Now: '. time();
Now: 1660338149

Tip: > Timestamp of the start of the request is available in . $_SERVER['REQUEST_TIME']

DateTimeImmutable``date``microtime