<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.reflectionextension.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'reflectionextension.getconstants.php',
    1 => 'ReflectionExtension::getConstants',
    2 => 'Gets constants',
  ),
  'up' => 
  array (
    0 => 'class.reflectionextension.php',
    1 => 'ReflectionExtension',
  ),
  'prev' => 
  array (
    0 => 'reflectionextension.getclassnames.php',
    1 => 'ReflectionExtension::getClassNames',
  ),
  'next' => 
  array (
    0 => 'reflectionextension.getdependencies.php',
    1 => 'ReflectionExtension::getDependencies',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/reflection/reflectionextension/getconstants.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="reflectionextension.getconstants" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ReflectionExtension::getConstants</h1>
  <p class="verinfo">(PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">ReflectionExtension::getConstants</span> &mdash; <span class="dc-title">Gets constants</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-reflectionextension.getconstants-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>ReflectionExtension::getConstants</strong></span>(): <span class="type"><a href="language.types.array.php" class="type array">array</a></span></div>

  <p class="para rdfs-comment">
   Get defined constants from an extension.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-reflectionextension.getconstants-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">This function has no parameters.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-reflectionextension.getconstants-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   An associative array with constant names as keys.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-reflectionextension.getconstants-examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Example #1 <span class="methodname"><strong>ReflectionExtension::getConstants()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$ext </span><span style="color: #007700">= new </span><span style="color: #0000BB">ReflectionExtension</span><span style="color: #007700">(</span><span style="color: #DD0000">'DOM'</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$ext</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getConstants</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>The above example will output
something similar to:</p></div>
    <div class="example-contents screen">
<div class="annotation-interactive examplescode"><pre class="examplescode">Array
(
    [XML_ELEMENT_NODE] =&gt; 1
    [XML_ATTRIBUTE_NODE] =&gt; 2
    [XML_TEXT_NODE] =&gt; 3
    [XML_CDATA_SECTION_NODE] =&gt; 4
    [XML_ENTITY_REF_NODE] =&gt; 5
    [XML_ENTITY_NODE] =&gt; 6
    [XML_PI_NODE] =&gt; 7
    [XML_COMMENT_NODE] =&gt; 8
    [XML_DOCUMENT_NODE] =&gt; 9
    [XML_DOCUMENT_TYPE_NODE] =&gt; 10
    [XML_DOCUMENT_FRAG_NODE] =&gt; 11
    [XML_NOTATION_NODE] =&gt; 12
    [XML_HTML_DOCUMENT_NODE] =&gt; 13
    [XML_DTD_NODE] =&gt; 14
    [XML_ELEMENT_DECL_NODE] =&gt; 15
    [XML_ATTRIBUTE_DECL_NODE] =&gt; 16
    [XML_ENTITY_DECL_NODE] =&gt; 17
    [XML_NAMESPACE_DECL_NODE] =&gt; 18
    [XML_LOCAL_NAMESPACE] =&gt; 18
    [XML_ATTRIBUTE_CDATA] =&gt; 1
    [XML_ATTRIBUTE_ID] =&gt; 2
    [XML_ATTRIBUTE_IDREF] =&gt; 3
    [XML_ATTRIBUTE_IDREFS] =&gt; 4
    [XML_ATTRIBUTE_ENTITY] =&gt; 6
    [XML_ATTRIBUTE_NMTOKEN] =&gt; 7
    [XML_ATTRIBUTE_NMTOKENS] =&gt; 8
    [XML_ATTRIBUTE_ENUMERATION] =&gt; 9
    [XML_ATTRIBUTE_NOTATION] =&gt; 10
    [DOM_PHP_ERR] =&gt; 0
    [DOM_INDEX_SIZE_ERR] =&gt; 1
    [DOMSTRING_SIZE_ERR] =&gt; 2
    [DOM_HIERARCHY_REQUEST_ERR] =&gt; 3
    [DOM_WRONG_DOCUMENT_ERR] =&gt; 4
    [DOM_INVALID_CHARACTER_ERR] =&gt; 5
    [DOM_NO_DATA_ALLOWED_ERR] =&gt; 6
    [DOM_NO_MODIFICATION_ALLOWED_ERR] =&gt; 7
    [DOM_NOT_FOUND_ERR] =&gt; 8
    [DOM_NOT_SUPPORTED_ERR] =&gt; 9
    [DOM_INUSE_ATTRIBUTE_ERR] =&gt; 10
    [DOM_INVALID_STATE_ERR] =&gt; 11
    [DOM_SYNTAX_ERR] =&gt; 12
    [DOM_INVALID_MODIFICATION_ERR] =&gt; 13
    [DOM_NAMESPACE_ERR] =&gt; 14
    [DOM_INVALID_ACCESS_ERR] =&gt; 15
    [DOM_VALIDATION_ERR] =&gt; 16
)</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-reflectionextension.getconstants-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="methodname"><a href="reflectionextension.getinientries.php" class="methodname" rel="rdfs-seeAlso">ReflectionExtension::getINIEntries()</a> - Gets extension ini entries</span></li>
   </ul>
  </p>
 </div>


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