<?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.is-iterable.php',
    1 => 'is_iterable',
    2 => 'Verify that the contents of a variable is an iterable value',
  ),
  'up' => 
  array (
    0 => 'ref.var.php',
    1 => 'Funktionen zur Behandlung von Variablen',
  ),
  'prev' => 
  array (
    0 => 'function.is-integer.php',
    1 => 'is_integer',
  ),
  'next' => 
  array (
    0 => 'function.is-long.php',
    1 => 'is_long',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/var/functions/is-iterable.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.is-iterable" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">is_iterable</h1>
  <p class="verinfo">(PHP 7 &gt;= 7.1.0, PHP 8)</p><p class="refpurpose"><span class="refname">is_iterable</span> &mdash; <span class="dc-title">
   Verify that the contents of a variable is an iterable value
  </span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.is-iterable-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>is_iterable</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="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   Verify that the contents of a variable is accepted by the
   <span class="type"><a href="language.types.iterable.php" class="type iterable">iterable</a></span> pseudo-type, i.e. that it is either an <span class="type"><a href="language.types.array.php" class="type array">array</a></span> or
   an object implementing <span class="classname"><a href="class.traversable.php" class="classname">Traversable</a></span>
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.is-iterable-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">value</code></dt>
     <dd>
      <p class="para">
       The value to check
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.is-iterable-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Returns <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> if <code class="parameter">value</code> is iterable, <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> 
   otherwise.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.is-iterable-examples">
  <h3 class="title">Beispiele</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Beispiel #1 <span class="function"><strong>is_iterable()</strong></span> examples</strong></p>
    <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /><br />var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">is_iterable</span><span style="color: #007700">([</span><span style="color: #0000BB">1</span><span style="color: #007700">, </span><span style="color: #0000BB">2</span><span style="color: #007700">, </span><span style="color: #0000BB">3</span><span style="color: #007700">]));  </span><span style="color: #FF8000">// bool(true)<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">is_iterable</span><span style="color: #007700">(new </span><span style="color: #0000BB">ArrayIterator</span><span style="color: #007700">([</span><span style="color: #0000BB">1</span><span style="color: #007700">, </span><span style="color: #0000BB">2</span><span style="color: #007700">, </span><span style="color: #0000BB">3</span><span style="color: #007700">])));  </span><span style="color: #FF8000">// bool(true)<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">is_iterable</span><span style="color: #007700">((function () { yield </span><span style="color: #0000BB">1</span><span style="color: #007700">; })()));  </span><span style="color: #FF8000">// bool(true)<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">is_iterable</span><span style="color: #007700">(</span><span style="color: #0000BB">1</span><span style="color: #007700">));  </span><span style="color: #FF8000">// bool(false)<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">is_iterable</span><span style="color: #007700">(new </span><span style="color: #0000BB">stdClass</span><span style="color: #007700">()));  </span><span style="color: #FF8000">// bool(false)<br /><br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

   </div>   
  </p>   
 </div>


 <div class="refsect1 seealso" id="refsect1-function.is-iterable-seealso">
  <h3 class="title">Siehe auch</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.is-array.php" class="function" rel="rdfs-seeAlso">is_array()</a> - Pr&uuml;ft, ob die Variable ein Array ist</span></li>
   </ul>
  </p>
 </div>


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