<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.datetime.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'function.time.php',
    1 => 'time',
    2 => 'Liefert den aktuellen Unix-Zeitstempel',
  ),
  'up' => 
  array (
    0 => 'ref.datetime.php',
    1 => 'Datum/Uhrzeit-Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.strtotime.php',
    1 => 'strtotime',
  ),
  'next' => 
  array (
    0 => 'function.timezone-abbreviations-list.php',
    1 => 'timezone_abbreviations_list',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'de',
    'path' => 'reference/datetime/functions/time.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.time" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">time</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">time</span> &mdash; <span class="dc-title">Liefert den aktuellen Unix-Zeitstempel</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.time-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>time</strong></span>(): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>

  <p class="para rdfs-comment">
   Gibt die Anzahl der seit Beginn der Unix-Epoche (Januar 1 1970 00:00:00 GMT)
   bis jetzt vergangenen Sekunden zurück.
  </p>
  <blockquote class="note"><p><strong class="note">Hinweis</strong>: 
   <p class="para">
    Unix-Zeitstempel enthalten keine Informationen über eine lokale Zeitzone.
    Um die Fallstricke zu vermeiden, die mit reinen Unix-Zeitstempeln
    einhergehen, wird daher empfohlen, für den Umgang mit Datums- und
    Zeitinformationen die Klasse <span class="classname"><a href="class.datetimeimmutable.php" class="classname">DateTimeImmutable</a></span> zu
    verwenden.
   </p>
  </p></blockquote>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.time-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">Diese Funktion besitzt keine Parameter.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.time-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Gibt den aktuellen Unix-Zeitstempel zurück.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.time-examples">
  <h3 class="title">Beispiele</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Beispiel #1 <span class="function"><strong>time()</strong></span>-Beispiel</strong></p>
    <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">echo </span><span style="color: #DD0000">'Jetzt: '</span><span style="color: #007700">. </span><span style="color: #0000BB">time</span><span style="color: #007700">();</span></span></code></div>
    </div>

    <div class="example-contents"><p>Das oben gezeigte Beispiel erzeugt
eine ähnliche Ausgabe wie:</p></div>
    <div class="example-contents screen">
<div class="annotation-interactive examplescode"><pre class="examplescode">Jetzt: 1660338149</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 notes" id="refsect1-function.time-notes">
  <h3 class="title">Anmerkungen</h3>
  <div class="tip"><strong class="tip">Tipp</strong>
   <p class="para">
    Der Zeitstempel des Beginns der aktuellen Anfrage steht in der Variablen
    <var class="varname"><a href="reserved.variables.server.php" class="classname">$_SERVER['REQUEST_TIME']</a></var> zur Verfügung.
   </p>
  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.time-seealso">
  <h3 class="title">Siehe auch</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="classname"><a href="class.datetimeimmutable.php" class="classname">DateTimeImmutable</a></span></li>
    <li><span class="function"><a href="function.date.php" class="function" rel="rdfs-seeAlso">date()</a> - Formatiert einen Unix-Zeitstempel</span></li>
    <li><span class="function"><a href="function.microtime.php" class="function" rel="rdfs-seeAlso">microtime()</a> - Liefert den aktuellen Unix-Zeitstempel mit Mikrosekunden</span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>