<?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 => 'pt_BR',
  ),
  'this' => 
  array (
    0 => 'reflectionconstant.getnamespacename.php',
    1 => 'ReflectionConstant::getNamespaceName',
    2 => 'Obt&eacute;m o nome do namespace',
  ),
  'up' => 
  array (
    0 => 'class.reflectionconstant.php',
    1 => 'ReflectionConstant',
  ),
  'prev' => 
  array (
    0 => 'reflectionconstant.getname.php',
    1 => 'ReflectionConstant::getName',
  ),
  'next' => 
  array (
    0 => 'reflectionconstant.getshortname.php',
    1 => 'ReflectionConstant::getShortName',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'pt_BR',
    'path' => 'reference/reflection/reflectionconstant/getnamespacename.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="reflectionconstant.getnamespacename" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ReflectionConstant::getNamespaceName</h1>
  <p class="verinfo">(PHP 8 &gt;= 8.4.0)</p><p class="refpurpose"><span class="refname">ReflectionConstant::getNamespaceName</span> &mdash; <span class="dc-title">Obtém o nome do namespace</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-reflectionconstant.getnamespacename-description">
  <h3 class="title">Descrição</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>ReflectionConstant::getNamespaceName</strong></span>(): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>

  <p class="simpara">
   Obtém o nome do namespace da constante.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-reflectionconstant.getnamespacename-parameters">
  <h3 class="title">Parâmetros</h3>
  <p class="para">Esta função não possui parâmetros.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-reflectionconstant.getnamespacename-returnvalues">
  <h3 class="title">Valor Retornado</h3>
  <p class="simpara">
   O nome do namespace ou uma string vazia para o namespace global.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-reflectionconstant.getnamespacename-examples">
  <h3 class="title">Exemplos</h3>
  <div class="example" id="example-1">
   <p><strong>Exemplo #1 Exemplo de <span class="methodname"><strong>ReflectionConstant::getNamespaceName()</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 /></span><span style="color: #007700">namespace </span><span style="color: #0000BB">Foo </span><span style="color: #007700">{<br />   const </span><span style="color: #0000BB">BAR </span><span style="color: #007700">= </span><span style="color: #DD0000">'bar'</span><span style="color: #007700">;<br />   </span><span style="color: #0000BB">var_dump</span><span style="color: #007700">((new </span><span style="color: #0000BB">\ReflectionConstant</span><span style="color: #007700">(</span><span style="color: #DD0000">'Foo\BAR'</span><span style="color: #007700">))-&gt;</span><span style="color: #0000BB">getNamespaceName</span><span style="color: #007700">());<br />}<br /><br />namespace {<br />   const </span><span style="color: #0000BB">BAR </span><span style="color: #007700">= </span><span style="color: #DD0000">'bar'</span><span style="color: #007700">;<br />   </span><span style="color: #0000BB">var_dump</span><span style="color: #007700">((new </span><span style="color: #0000BB">\ReflectionConstant</span><span style="color: #007700">(</span><span style="color: #DD0000">'BAR'</span><span style="color: #007700">))-&gt;</span><span style="color: #0000BB">getNamespaceName</span><span style="color: #007700">());<br />}<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

   <div class="example-contents"><p>O exemplo acima produzirá:</p></div>
   <div class="example-contents screen">
<div class="annotation-interactive examplescode"><pre class="examplescode">string(3) &quot;Foo&quot;
string(0) &quot;&quot;</pre>
</div>
   </div>
  </div>
 </div>


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