time() gives the timestamp of Greenwich Mean Time (GMT) which is defined as the official time for the whole earth. You get the local time by adding the time zone offset to this timestamp.
(PHP 4, PHP 5, PHP 7, PHP 8)
time — Geçerli Unix zaman damgasını döndürür
Unix Zaman Başlangıcından (1 Ocak 1970 00:00:00 GMT) itibaren geçen zamanı saniye cinsinden döndürür.
Bilginize:
Unix zaman damgaları yerel zaman dilimi hakkında herhangi bir bilgi içermez. Tarih ve saat bilgilerini işlerken Unix zaman damgalarından kaynaklanan böyle tehlikelerden kaçınmak için DateTimeImmutable sınıfının kullanılması önerilir.
Bu işlevin bağımsız değişkeni yoktur.
Geçerli zaman damgasını döndürür.
Örnek 1 - time() örneği
<?php
echo 'Şimdi: '. time();
?>
Yukarıdaki örnek şuna benzer bir çıktı üretir:
Şimdi: 1660338149
İstek başlangıç zaman damgası $_SERVER['REQUEST_TIME'] değişkenine atanır.
time() gives the timestamp of Greenwich Mean Time (GMT) which is defined as the official time for the whole earth. You get the local time by adding the time zone offset to this timestamp.