Name
localtime
Synopsis
array localtime([inttimestamp
[, boolassociative
])
Returns an array of values as given by the C function of the
same name. The first argument is the timestamp; if the second argument
is provided and is true
, the values
are returned as an associative array. If the second argument is not
provided or is false
, a numeric
array is returned. The keys and values returned are:
| Seconds |
| Minutes |
| Hour |
| Day of the month |
| Month of the year |
| Number of years since 1900 |
| Day of the week |
| Day of the year |
|
|
If a numeric array is returned, the values are in the order given above.
Get Programming PHP, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.