<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.reflectionconstant.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'reflectionconstant.getextension.php',
    1 => 'ReflectionConstant::getExtension',
    2 => 'Gets ReflectionExtension of the defining extension',
  ),
  'up' => 
  array (
    0 => 'class.reflectionconstant.php',
    1 => 'ReflectionConstant',
  ),
  'prev' => 
  array (
    0 => 'reflectionconstant.construct.php',
    1 => 'ReflectionConstant::__construct',
  ),
  'next' => 
  array (
    0 => 'reflectionconstant.getextensionname.php',
    1 => 'ReflectionConstant::getExtensionName',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/reflection/reflectionconstant/getextension.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="reflectionconstant.getextension" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ReflectionConstant::getExtension</h1>
  <p class="verinfo">(PHP 8 &gt;= 8.5.0)</p><p class="refpurpose"><span class="refname">ReflectionConstant::getExtension</span> &mdash; <span class="dc-title">Gets <span class="classname"><a href="class.reflectionextension.php" class="classname">ReflectionExtension</a></span> of the defining extension</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-reflectionconstant.getextension-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>ReflectionConstant::getExtension</strong></span>(): <span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="class.reflectionextension.php" class="type ReflectionExtension">ReflectionExtension</a></span></span></div>

  <p class="simpara">
   Gets a <span class="classname"><a href="class.reflectionextension.php" class="classname">ReflectionExtension</a></span> object for the extension
   which defined the constant.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-reflectionconstant.getextension-parameters">
  <h3 class="title">参数</h3>
  <p class="para">此函数没有参数。</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-reflectionconstant.getextension-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="simpara">
   A <span class="classname"><a href="class.reflectionextension.php" class="classname">ReflectionExtension</a></span> object representing the
   extension which defined the constant, or <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> for user-defined constants.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-reflectionconstant.getextension-examples">
  <h3 class="title">示例</h3>
  <div class="example" id="example-5493">
   <p><strong>示例 #1 Basic usage of <span class="methodname"><strong>ReflectionConstant::getExtension()</strong></span></strong></p>
   <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />var_dump</span><span style="color: #007700">((new </span><span style="color: #0000BB">ReflectionConstant</span><span style="color: #007700">(</span><span style="color: #DD0000">'SQLITE3_TEXT'</span><span style="color: #007700">))-&gt;</span><span style="color: #0000BB">getExtension</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

   <div class="example-contents"><p>以上示例会输出:</p></div>
   <div class="example-contents screen">
<div class="annotation-interactive examplescode"><pre class="examplescode">object(ReflectionExtension)#2 (1) {
  [&quot;name&quot;]=&gt;
  string(7) &quot;sqlite3&quot;
}</pre>
</div>
   </div>
  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-reflectionconstant.getextension-seealso">
  <h3 class="title">参见</h3>
  <ul class="simplelist">
   <li><span class="methodname"><a href="reflectionconstant.getextensionname.php" class="methodname" rel="rdfs-seeAlso">ReflectionConstant::getExtensionName()</a> - Gets name of the defining extension</span></li>
  </ul>
 </div>


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