<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.var.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'function.var-dump.php',
    1 => 'var_dump',
    2 => 'Gibt alle Informationen zu einer Variablen aus',
  ),
  'up' => 
  array (
    0 => 'ref.var.php',
    1 => 'Funktionen zur Behandlung von Variablen',
  ),
  'prev' => 
  array (
    0 => 'function.unset.php',
    1 => 'unset',
  ),
  'next' => 
  array (
    0 => 'function.var-export.php',
    1 => 'var_export',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'de',
    'path' => 'reference/var/functions/var-dump.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.var-dump" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">var_dump</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">var_dump</span> &mdash; <span class="dc-title">Gibt alle Informationen zu einer Variablen aus</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.var-dump-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>var_dump</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span>, <span class="methodparam"><span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span> <code class="parameter">...$values</code></span>): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>

  <p class="simpara">
   Die Funktion gibt strukturierte Informationen über einen oder mehrere
   Ausdrücke aus, darunter auch den entsprechenden Typ und Wert. Arrays und
   Objekte werden rekursiv durchlaufen und die jeweiligen Werte eingerückt
   dargestellt, um die Struktur zu verdeutlichen.
  </p>
  <p class="simpara">
   Alle öffentlichen (public), privaten (private) und
   geschützten (protected) Eigenschaften eines Objekts werden in der Ausgabe
   dargestellt, außer wenn das Objekt eine
   <a href="language.oop5.magic.php#language.oop5.magic.debuginfo" class="link">__debugInfo()</a>-Methode
   implementiert.
  </p>
  <div class="tip"><strong class="tip">Tipp</strong><p class="simpara">Bei allem, dessen Ergebnisausgabe direkt
im Browser angezeigt wird, können Sie die
<a href="book.outcontrol.php" class="link">Funktionen zur Ausgabesteuerung</a> verwenden.
Damit lässt sich die Ausgabe dieser Funktion erfassen, und - zum Beispiel -
in einem <span class="type"><a href="language.types.string.php" class="type string">string</a></span> speichern.</p></div>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.var-dump-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">value</code></dt>
     <dd>
      <p class="para">
       Der auszugebende Ausdruck.
      </p>
     </dd>
    
    
     <dt><code class="parameter">values</code></dt>
     <dd>
      <p class="para">
       Weitere auszugebende Ausdrücke.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.var-dump-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Es wird kein Wert zurückgegeben.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.var-dump-examples">
  <h3 class="title">Beispiele</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Beispiel #1 <span class="function"><strong>var_dump()</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 />$a </span><span style="color: #007700">= array(</span><span style="color: #0000BB">1</span><span style="color: #007700">, </span><span style="color: #0000BB">2</span><span style="color: #007700">, array(</span><span style="color: #DD0000">"a"</span><span style="color: #007700">, </span><span style="color: #DD0000">"b"</span><span style="color: #007700">, </span><span style="color: #DD0000">"c"</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$a</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 folgende Ausgabe:</p></div>
    <div class="example-contents screen">
<div class="annotation-interactive examplescode"><pre class="examplescode">array(3) {
  [0]=&gt;
  int(1)
  [1]=&gt;
  int(2)
  [2]=&gt;
  array(3) {
    [0]=&gt;
    string(1) &quot;a&quot;
    [1]=&gt;
    string(1) &quot;b&quot;
    [2]=&gt;
    string(1) &quot;c&quot;
  }
}</pre>
</div>
    </div>
    <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /><br />$b </span><span style="color: #007700">= </span><span style="color: #0000BB">3.1</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$c </span><span style="color: #007700">= </span><span style="color: #0000BB">true</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$b</span><span style="color: #007700">, </span><span style="color: #0000BB">$c</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>Das oben gezeigte Beispiel erzeugt folgende Ausgabe:</p></div>
    <div class="example-contents screen">
<div class="annotation-interactive examplescode"><pre class="examplescode">float(3.1)
bool(true)</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.var-dump-seealso">
  <h3 class="title">Siehe auch</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.print-r.php" class="function" rel="rdfs-seeAlso">print_r()</a> - Gibt Variablen-Informationen in lesbarer Form aus</span></li>
    <li><span class="function"><a href="function.debug-zval-dump.php" class="function" rel="rdfs-seeAlso">debug_zval_dump()</a> - Dumps a string representation of an internal zval structure to output</span></li>
    <li><span class="function"><a href="function.var-export.php" class="function" rel="rdfs-seeAlso">var_export()</a> - Liefert den Inhalt einer Variablen als parsbaren PHP-Code</span></li>
    <li><a href="language.oop5.magic.php#language.oop5.magic.debuginfo" class="link">__debugInfo()</a></li>
   </ul>
  </p>
 </div>

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