<?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.strptime.php',
    1 => 'strptime',
    2 => 'Wertet eine Zeit-/Datumsangabe aus, die mit strftime
   erzeugt wurde',
  ),
  'up' => 
  array (
    0 => 'ref.datetime.php',
    1 => 'Datum/Uhrzeit-Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.strftime.php',
    1 => 'strftime',
  ),
  'next' => 
  array (
    0 => 'function.strtotime.php',
    1 => 'strtotime',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'de',
    'path' => 'reference/datetime/functions/strptime.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.strptime" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">strptime</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.1.0, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">strptime</span> &mdash; <span class="dc-title">
   Wertet eine Zeit-/Datumsangabe aus, die mit <span class="function"><a href="function.strftime.php" class="function">strftime()</a></span>
   erzeugt wurde
  </span></p>

 </div>

 <div id="function.strptime-refsynopsisdiv">
  <div class="warning"><strong class="warning">Warnung</strong><p class="simpara">Diese Funktion ist seit
PHP 8.1.0 als <em>DEPRECATED</em> (veraltet) markiert. Von der
Verwendung dieser Funktion wird dringend abgeraten.</p></div>
 </div>

 <div class="refsect1 description" id="refsect1-function.strptime-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="attribute"><a href="class.deprecated.php">#[\Deprecated]</a> </span><br>
   <span class="methodname"><strong>strptime</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$timestamp</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$format</code></span>): <span class="type"><span class="type"><a href="language.types.array.php" class="type array">array</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>strptime()</strong></span> gibt ein Array mit dem ausgewerteten
   Zeitstempel <code class="parameter">timestamp</code> zurück oder <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>, falls ein
   Fehler auftritt.
  </p>
  <p class="para">
   Monats- und Wochentagsnamen und andere sprachabhängige Zeichenketten werden
   unter Berücksichtigung des aktuellen Gebietsschemas zurückgegeben, das mit
   <span class="function"><a href="function.setlocale.php" class="function">setlocale()</a></span> festgelegt wurde (<strong><code><a href="string.constants.php#constant.lc-time">LC_TIME</a></code></strong>).
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.strptime-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">timestamp</code> (<span class="type"><a href="language.types.string.php" class="type string">string</a></span>)</dt>
     <dd>
      <p class="para">
       Die Zeichenkette, die ausgewertet werden soll (z. B. zurückgegeben von
       <span class="function"><a href="function.strftime.php" class="function">strftime()</a></span>).
      </p>
     </dd>
    
    
     <dt><code class="parameter">format</code> (<span class="type"><a href="language.types.string.php" class="type string">string</a></span>)</dt>
     <dd>
      <p class="para">
       Das in <code class="parameter">timestamp</code> verwendete Format (z. B. das
       gleiche wie das von <span class="function"><a href="function.strftime.php" class="function">strftime()</a></span> verwendete). Es ist
       zu beachten, dass einige der in <span class="function"><a href="function.strftime.php" class="function">strftime()</a></span>
       verfügbaren Formatierungsoptionen in <span class="function"><strong>strptime()</strong></span>
       möglicherweise keine Wirkung haben. Welche von ihnen genau unterstützt
       werden, hängt vom Betriebssystem und der verwendeten C-Bibliothek ab.
      </p>
      <p class="para">
       Weitere Informationen zu den Formatierungsoptionen sind auf der Seite
       <span class="function"><a href="function.strftime.php" class="function">strftime()</a></span> zu finden.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.strptime-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Gibt ein Array zurück. Bei einem Fehler wird <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> zurückgegeben.
  </p>
  <p class="para">
   <table class="doctable table">
    <caption><strong>Die folgenden Parameter werden im Array zurückgegeben</strong></caption>
    
     <thead>
      <tr>
       <th>Parameter</th>
       <th>Beschreibung</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td><code class="literal">&quot;tm_sec&quot;</code></td>
       <td>Sekunden nach der Minute (0-61)</td>
      </tr>

      <tr>
       <td><code class="literal">&quot;tm_min&quot;</code></td>
       <td>Minuten nach der Stunde (0-59)</td>
      </tr>

      <tr>
       <td><code class="literal">&quot;tm_hour&quot;</code></td>
       <td>Stunden seit Mitternacht (0-23)</td>
      </tr>

      <tr>
       <td><code class="literal">&quot;tm_mday&quot;</code></td>
       <td>Tag des Monats (1-31)</td>
      </tr>

      <tr>
       <td><code class="literal">&quot;tm_mon&quot;</code></td>
       <td>Monate seit Januar (0-11)</td>
      </tr>

      <tr>
       <td><code class="literal">&quot;tm_year&quot;</code></td>
       <td>Jahre seit 1900</td>
      </tr>

      <tr>
       <td><code class="literal">&quot;tm_wday&quot;</code></td>
       <td>Tage seit Sonntag (0-6)</td>
      </tr>

      <tr>
       <td><code class="literal">&quot;tm_yday&quot;</code></td>
       <td>Tage seit dem 1. Januar (0-365)</td>
      </tr>

      <tr>
       <td><code class="literal">&quot;unparsed&quot;</code></td>
       <td>
        Der Teil von <code class="parameter">timestamp</code>, der mit dem angegebenen
        <code class="parameter">format</code> nicht erkannt wurde
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.strptime-changelog">
  <h3 class="title">Changelog</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Version</th>
       <th>Beschreibung</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>8.1.0</td>
       <td>
        Diese Funktion ist veraltet. Stattdessen sollte
        <span class="function"><a href="function.date-parse-from-format.php" class="function">date_parse_from_format()</a></span> verwendet werden (für eine
        Auswertung, die nicht vom Gebietsschema abhängig ist) oder
        <span class="methodname"><a href="intldateformatter.parse.php" class="methodname">IntlDateFormatter::parse()</a></span> (für eine
        Auswertung, die vom Gebietsschema abhängig ist)
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.strptime-examples">
  <h3 class="title">Beispiele</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Beispiel #1 <span class="function"><strong>strptime()</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 />$format </span><span style="color: #007700">= </span><span style="color: #DD0000">'%d/%m/%Y %H:%M:%S'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$strf </span><span style="color: #007700">= </span><span style="color: #0000BB">strftime</span><span style="color: #007700">(</span><span style="color: #0000BB">$format</span><span style="color: #007700">);<br /><br />echo </span><span style="color: #DD0000">"</span><span style="color: #0000BB">$strf</span><span style="color: #DD0000">\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">strptime</span><span style="color: #007700">(</span><span style="color: #0000BB">$strf</span><span style="color: #007700">, </span><span style="color: #0000BB">$format</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">03/10/2004 15:54:19

Array
(
    [tm_sec] =&gt; 19
    [tm_min] =&gt; 54
    [tm_hour] =&gt; 15
    [tm_mday] =&gt; 3
    [tm_mon] =&gt; 9
    [tm_year] =&gt; 104
    [tm_wday] =&gt; 0
    [tm_yday] =&gt; 276
    [unparsed] =&gt;
)</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 notes" id="refsect1-function.strptime-notes">
  <h3 class="title">Anmerkungen</h3>
  <blockquote class="note"><p><strong class="note">Hinweis</strong>: <span class="simpara">Diese Funktion ist auf
Windows-Plattformen nicht verfügbar.</span></p></blockquote>
  <blockquote class="note"><p><strong class="note">Hinweis</strong>: 
   <p class="para">
    Intern ruft diese Funktion die Funktion <span class="function"><strong>strptime()</strong></span> der
    C-Bibliothek des Betriebssystems auf. Diese Funktion kann sich auf
    verschiedenen Betriebssystemen deutlich unterschiedlich verhalten. Es wird
    daher empfohlen, die Funktion <span class="function"><a href="function.date-parse-from-format.php" class="function">date_parse_from_format()</a></span>
    zu verwenden, die von diesem Problem nicht betroffen ist.
   </p>
  </p></blockquote>
  <blockquote class="note"><p><strong class="note">Hinweis</strong>: 
   <p class="para">
    <code class="literal">&quot;tm_sec&quot;</code> berücksichtigt alle Schaltsekunden (derzeit
    bis zu 2 pro Jahr). Weitere Informationen zu Schaltsekunden sind im
    <a href="http://en.wikipedia.org/wiki/Leap_second" class="link external">&raquo;&nbsp;Wikipedia-Artikel über Schaltsekunden</a>
    zu finden.
   </p>
  </p></blockquote>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.strptime-seealso">
  <h3 class="title">Siehe auch</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="methodname"><a href="intldateformatter.parse.php" class="methodname" rel="rdfs-seeAlso">IntlDateFormatter::parse()</a> - Parse string to a timestamp value</span></li>
    <li><span class="methodname"><a href="datetime.createfromformat.php" class="methodname" rel="rdfs-seeAlso">DateTime::createFromFormat()</a> - Wertet eine Zeitangabe gem&auml;&szlig; dem angegebenen Format aus</span></li>
    <li><span class="function"><a href="function.checkdate.php" class="function" rel="rdfs-seeAlso">checkdate()</a> - Pr&uuml;ft ein Gregorianisches Datum auf G&uuml;ltigkeit</span></li>
    <li><span class="function"><a href="function.strftime.php" class="function" rel="rdfs-seeAlso">strftime()</a> - Formatiert eine Zeit-/Datumsangabe gem&auml;&szlig; dem Gebietsschema</span></li>
    <li><span class="function"><a href="function.date-parse-from-format.php" class="function" rel="rdfs-seeAlso">date_parse_from_format()</a> - Ermittelt Informationen &uuml;ber das angegebene Datum anhand des angegebenen Formats</span></li>
   </ul>
  </p>
 </div>


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