[PHP] getdate()

getdate() (funzione PHP) restituisce un array con le informazioni di data / ora di un timestamp determinato o, in mancanza, dell’attuale.

tips&tricks

Sintassi

getdate($timestamp[facoltativo])
parametro descrizione
$timestamp Un timestamp. In mancanza, il timestamp corrente

Esempi

$adesso = getdate();
print_r($adesso);
/* RISULTATO
Array
(
    [seconds] => 12
    [minutes] => 12
    [hours] => 15
    [mday] => 17
    [wday] => 2
    [mon] => 4
    [year] => 2018
    [yday] => 106
    [weekday] => Tuesday
    [month] => April
    [0] => 1523977932
)
*/

Contenuti correlati

Fonti esterne

funzioni php, php

Related Articles

0 Comment