<?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 => 'ja',
  ),
  'this' => 
  array (
    0 => 'reflectionreference.fromarrayelement.php',
    1 => 'ReflectionReference::fromArrayElement',
    2 => '配列の要素から、ReflectionReference を生成する',
  ),
  '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' => 'ja',
    '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">配列の要素から、ReflectionReference を生成する</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-reflectionreference.fromarrayelement-description">
  <h3 class="title">説明</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">
   配列の要素から、<span class="classname"><a href="class.reflectionreference.php" class="classname">ReflectionReference</a></span> を生成します。
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-reflectionreference.fromarrayelement-parameters">
  <h3 class="title">パラメータ</h3>
  <dl>
   
    <dt><code class="parameter">array</code></dt>
    <dd>
     <p class="para">
      リファレンスの情報が含まれる <span class="type"><a href="language.types.array.php" class="type array">array</a></span>。
     </p>
    </dd>
   
   
    <dt><code class="parameter">key</code></dt>
    <dd>
     <p class="para">
      キー。<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>。
     </p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-reflectionreference.fromarrayelement-returnvalues">
  <h3 class="title">戻り値</h3>
  <p class="para">
   <code class="literal">$array[$key]</code> がリファレンスの場合、
   <span class="classname"><a href="class.reflectionreference.php" class="classname">ReflectionReference</a></span> のインスタンスを返します。
   そうでない場合、<strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> を返します。
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-reflectionreference.fromarrayelement-errors">
  <h3 class="title">エラー / 例外</h3>
  <p class="para">
   <code class="parameter">array</code> が <span class="type"><a href="language.types.array.php" class="type array">array</a></span> でない場合、
   または <code class="parameter">key</code> が <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 class="classname"><a href="class.typeerror.php" class="classname">TypeError</a></span> がスローされます。
   <code class="literal">$array[$key]</code> が存在しない場合、
   <span class="classname"><a href="class.reflectionexception.php" class="classname">ReflectionException</a></span> がスローされます。
  </p>
 </div>


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