<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.reflectionreference.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'reflectionreference.fromarrayelement.php',
    1 => 'ReflectionReference::fromArrayElement',
    2 => 'Create a ReflectionReference from an array element',
  ),
  'up' => 
  array (
    0 => 'class.reflectionreference.php',
    1 => 'ReflectionReference',
  ),
  'prev' => 
  array (
    0 => 'reflectionreference.construct.php',
    1 => 'ReflectionReference::__construct',
  ),
  'next' => 
  array (
    0 => 'reflectionreference.getid.php',
    1 => 'ReflectionReference::getId',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/reflection/reflectionreference/fromarrayelement.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="reflectionreference.fromarrayelement" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ReflectionReference::fromArrayElement</h1>
  <p class="verinfo">(PHP 7 &gt;= 7.4.0, PHP 8)</p><p class="refpurpose"><span class="refname">ReflectionReference::fromArrayElement</span> &mdash; <span class="dc-title">Create a ReflectionReference from an array element</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-reflectionreference.fromarrayelement-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><strong>ReflectionReference::fromArrayElement</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.array.php" class="type array">array</a></span> <code class="parameter">$array</code></span>, <span class="methodparam"><span class="type"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span>|<span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$key</code></span>): <span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="class.reflectionreference.php" class="type ReflectionReference">ReflectionReference</a></span></span></div>

  <p class="para rdfs-comment">
   Creates a <span class="classname"><a href="class.reflectionreference.php" class="classname">ReflectionReference</a></span> from an array element.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-reflectionreference.fromarrayelement-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <dl>
   
    <dt><code class="parameter">array</code></dt>
    <dd>
     <p class="para">
      The <a href="language.types.array.php" class="link">Array</a> which contains the potential reference.
     </p>
    </dd>
   
   
    <dt><code class="parameter">key</code></dt>
    <dd>
     <p class="para">
      The key; either an <a href="language.types.integer.php" class="link">Integer</a> or a <a href="language.types.string.php" class="link">String</a>.
     </p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-reflectionreference.fromarrayelement-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Returns a <span class="classname"><a href="class.reflectionreference.php" class="classname">ReflectionReference</a></span> instance if
   <code class="literal">$array[$key]</code> is a reference, or <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> otherwise.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-reflectionreference.fromarrayelement-errors">
  <h3 class="title">Fehler/Exceptions</h3>
  <p class="para">
   If <code class="parameter">array</code> is not an <a href="language.types.array.php" class="link">Array</a>, or <code class="parameter">key</code>
   is not an <a href="language.types.integer.php" class="link">Integer</a> or <a href="language.types.string.php" class="link">String</a>, a <span class="classname"><a href="class.typeerror.php" class="classname">TypeError</a></span> is thrown. 
   If <code class="literal">$array[$key]</code> does not exist,
   a <span class="classname"><a href="class.reflectionexception.php" class="classname">ReflectionException</a></span> is thrown.
  </p>
 </div>


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