<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.strings.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'function.hex2bin.php',
    1 => 'hex2bin',
    2 => 'Dekodiert einen hexadezimal kodierten Bin&auml;rstring',
  ),
  'up' => 
  array (
    0 => 'ref.strings.php',
    1 => 'String-Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.hebrevc.php',
    1 => 'hebrevc',
  ),
  'next' => 
  array (
    0 => 'function.html-entity-decode.php',
    1 => 'html_entity_decode',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'de',
    'path' => 'reference/strings/functions/hex2bin.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.hex2bin" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">hex2bin</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.4.0, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">hex2bin</span> &mdash; <span class="dc-title">Dekodiert einen hexadezimal kodierten Binärstring</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.hex2bin-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>hex2bin</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$string</code></span>): <span class="type"><span class="type"><a href="language.types.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   Dekodiert einen hexadezimal kodierten Binärstring.
  </p>
  <div class="caution"><strong class="caution">Achtung</strong>
   <p class="para">
    Diese Funktion konvertiert eine Hexadezimalzahl <em>NICHT</em>
    in eine Binärzahl. Dafür kann stattdessen die <span class="function"><a href="function.base-convert.php" class="function">base_convert()</a></span>
    Funktion verwendet werden.
   </p>
  </div>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.hex2bin-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <dl>
   
    <dt><code class="parameter">string</code></dt>
    <dd>
     <p class="para">
      Hexadezimale Repräsentation von Daten.
     </p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.hex2bin-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Gibt die binäre Repräsentation der Daten zurück. Bei einem Fehler wird <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> zurückgegeben.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-function.hex2bin-errors">
  <h3 class="title">Fehler/Exceptions</h3>
  <p class="para">
   Falls die Länge des Eingabestrings ungerade ist, oder dieser ein ungültiger
   hexadezimaler String ist, wird ein <strong><code><a href="errorfunc.constants.php#constant.e-warning">E_WARNING</a></code></strong>-Fehler
   geworfen.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.hex2bin-examples">
  <h3 class="title">Beispiele</h3>
  <div class="example" id="hex2bin.example.basic">
   <p><strong>Beispiel #1 <span class="function"><strong>hex2bin()</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 />$hex </span><span style="color: #007700">= </span><span style="color: #0000BB">hex2bin</span><span style="color: #007700">(</span><span style="color: #DD0000">"4865786164657a696d616c6520426569737069656c646174656e"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$hex</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</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">string(26) &quot;Hexadezimale Beispieldaten&quot;</pre>
</div>
   </div>
  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.hex2bin-seealso">
  <h3 class="title">Siehe auch</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.bin2hex.php" class="function" rel="rdfs-seeAlso">bin2hex()</a> - Wandelt Bin&auml;r-Daten in ihre hexadezimale Entsprechung um</span></li>
    <li><span class="function"><a href="function.unpack.php" class="function" rel="rdfs-seeAlso">unpack()</a> - Entpackt die Daten einer bin&auml;re Zeichenkette</span></li>
   </ul>
  </p>
 </div>


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