<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/book.reflection.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'es',
  ),
  'this' => 
  array (
    0 => 'class.reflectionclassconstant.php',
    1 => 'ReflectionClassConstant',
    2 => 'La classe ReflectionClassConstant',
  ),
  'up' => 
  array (
    0 => 'book.reflection.php',
    1 => 'Reflexi&oacute;n',
  ),
  'prev' => 
  array (
    0 => 'reflectionclass.tostring.php',
    1 => 'ReflectionClass::__toString',
  ),
  'next' => 
  array (
    0 => 'reflectionclassconstant.construct.php',
    1 => 'ReflectionClassConstant::__construct',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'es',
    'path' => 'reference/reflection/reflectionclassconstant.xml',
  ),
  'history' => 
  array (
  ),
  'extra_header_links' => 
  array (
    'rel' => 'alternate',
    'href' => '/manual/en/feeds/class.reflectionclassconstant.atom',
    'type' => 'application/atom+xml',
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="class.reflectionclassconstant" class="reference">

 <h1 class="title">La classe ReflectionClassConstant</h1>
 

 <div class="partintro"><p class="verinfo">(PHP 7 &gt;= 7.1.0, PHP 8)</p>


  <div class="section" id="reflectionclassconstant.intro">
   <h2 class="title">Introducción</h2>
   <p class="para">
    La classe <span class="classname"><strong class="classname">ReflectionClassConstant</strong></span> proporciona
    información sobre una constante de clase.
   </p>
  </div>


  <div class="section" id="reflectionclassconstant.synopsis">
   <h2 class="title">Sinopsis de la Clase</h2>


   <div class="classsynopsis"><div class="classsynopsisinfo">
    
     <span class="modifier">class</span> <strong class="classname"><strong class="classname">ReflectionClassConstant</strong></strong>
    

    
     <span class="modifier">implements</span>
      <a href="class.reflector.php" class="interfacename">Reflector</a> {</div>

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Constantes */</div>
    <div class="fieldsynopsis">
     <span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.reflectionclassconstant.php#reflectionclassconstant.constants.is-public"><var class="varname">IS_PUBLIC</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.reflectionclassconstant.php#reflectionclassconstant.constants.is-protected"><var class="varname">IS_PROTECTED</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.reflectionclassconstant.php#reflectionclassconstant.constants.is-private"><var class="varname">IS_PRIVATE</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.reflectionclassconstant.php#reflectionclassconstant.constants.is-final"><var class="varname">IS_FINAL</var></a></var>;</div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Propiedades */</div>
    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
      <var class="varname"><a href="class.reflectionclassconstant.php#reflectionclassconstant.props.name">$<var class="varname">name</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
      <var class="varname"><a href="class.reflectionclassconstant.php#reflectionclassconstant.props.class">$<var class="varname">class</var></a></var>;</div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Métodos */</div>
    <div class="constructorsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="reflectionclassconstant.construct.php" class="methodname">__construct</a></span>(<span class="methodparam"><span class="type"><span class="type"><a href="language.types.object.php" class="type object">object</a></span>|<span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$class</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$constant</code></span>)</div>

    <div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="reflectionclassconstant.export.php" class="methodname">export</a></span>(<span class="methodparam"><span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span> <code class="parameter">$class</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$name</code></span>, <span class="methodparam"><span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span> <code class="parameter">$return</code><span class="initializer"> = ?</span></span>): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="reflectionclassconstant.getattributes.php" class="methodname">getAttributes</a></span>(<span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$name</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$flags</code><span class="initializer"> = 0</span></span>): <span class="type"><a href="language.types.array.php" class="type array">array</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="reflectionclassconstant.getdeclaringclass.php" class="methodname">getDeclaringClass</a></span>(): <span class="type"><a href="class.reflectionclass.php" class="type ReflectionClass">ReflectionClass</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="reflectionclassconstant.getdoccomment.php" class="methodname">getDocComment</a></span>(): <span class="type"><span class="type"><a href="language.types.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="reflectionclassconstant.getmodifiers.php" class="methodname">getModifiers</a></span>(): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="reflectionclassconstant.getname.php" class="methodname">getName</a></span>(): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="reflectionclassconstant.gettype.php" class="methodname">getType</a></span>(): <span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="class.reflectiontype.php" class="type ReflectionType">ReflectionType</a></span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="reflectionclassconstant.getvalue.php" class="methodname">getValue</a></span>(): <span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="reflectionclassconstant.hastype.php" class="methodname">hasType</a></span>(): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="reflectionclassconstant.isdeprecated.php" class="methodname">isDeprecated</a></span>(): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="reflectionclassconstant.isenumcase.php" class="methodname">isEnumCase</a></span>(): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="reflectionclassconstant.isfinal.php" class="methodname">isFinal</a></span>(): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="reflectionclassconstant.isprivate.php" class="methodname">isPrivate</a></span>(): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="reflectionclassconstant.isprotected.php" class="methodname">isProtected</a></span>(): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="reflectionclassconstant.ispublic.php" class="methodname">isPublic</a></span>(): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="reflectionclassconstant.tostring.php" class="methodname">__toString</a></span>(): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>

   }</div>


  </div>


  <div class="section" id="reflectionclassconstant.props">
   <h2 class="title">Propiedades</h2>
   <dl>
    
     <dt id="reflectionclassconstant.props.name"><var class="varname">name</var></dt>
     <dd>
      <p class="para">
       Nombre de la constante de clase. Solo lectura, genera una
       <span class="classname"><a href="class.reflectionexception.php" class="classname">ReflectionException</a></span> al intentar modificarla.
      </p>
     </dd>
    
    
     <dt id="reflectionclassconstant.props.class"><var class="varname">class</var></dt>
     <dd>
      <p class="para">
       Nombre de la clase donde se define la constante de clase. Solo lectura, genera una
       <span class="classname"><a href="class.reflectionexception.php" class="classname">ReflectionException</a></span> al intentar modificarla.
      </p>
     </dd>
    
   </dl>
  </div>



  <div class="section" id="reflectionclassconstant.constants">
   <h2 class="title">Constantes predefinidas</h2>
   <div class="section" id="reflectionclassconstant.constants.modifiers">
    <h2 class="title">Modificadores de ReflectionClassConstant</h2>
    <dl>

     
      <dt id="reflectionclassconstant.constants.is-public">
       <strong><code><a href="class.reflectionclassconstant.php#reflectionclassconstant.constants.is-public">ReflectionClassConstant::IS_PUBLIC</a></code></strong>
       <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      </dt>
      <dd>
       <p class="para">
        Indica las constantes <a href="language.oop5.visibility.php" class="link">public</a>.
        Anterior a PHP 7.4.0, el valor era <code class="literal">256</code>.
       </p>
      </dd>
     

     
      <dt id="reflectionclassconstant.constants.is-protected">
       <strong><code><a href="class.reflectionclassconstant.php#reflectionclassconstant.constants.is-protected">ReflectionClassConstant::IS_PROTECTED</a></code></strong>
       <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      </dt>
      <dd>
       <p class="para">
        Indica las constantes <a href="language.oop5.visibility.php" class="link">protected</a>.
        Anterior a PHP 7.4.0, el valor era <code class="literal">512</code>.
       </p>
      </dd>
     

     
      <dt id="reflectionclassconstant.constants.is-private">
       <strong><code><a href="class.reflectionclassconstant.php#reflectionclassconstant.constants.is-private">ReflectionClassConstant::IS_PRIVATE</a></code></strong>
       <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      </dt>
      <dd>
       <p class="para">
        Indica las constantes <a href="language.oop5.visibility.php" class="link">private</a>.
        Anterior a PHP 7.4.0, el valor era <code class="literal">1024</code>.
       </p>
      </dd>
     

     
      <dt id="reflectionclassconstant.constants.is-final">
       <strong><code><a href="class.reflectionclassconstant.php#reflectionclassconstant.constants.is-final">ReflectionClassConstant::IS_FINAL</a></code></strong>
       <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      </dt>
      <dd>
       <p class="para">
        Indica las constantes <a href="language.oop5.final.php" class="link">final</a>
        Disponible a partir de PHP 8.1.0.
       </p>
      </dd>
     

    </dl>
    <blockquote class="note"><p><strong class="note">Nota</strong>: 
     <p class="para">
      El valor de estas constantes puede cambiar entre versiones de PHP.
      Se recomienda siempre utilizar las constantes y no depender de los valores directamente.
     </p>
    </p></blockquote>
   </div>
  </div>


  <div class="section">
   <h2 class="title">Historial de cambios</h2>
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Versión</th>
       <th>Descripción</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>8.4.0</td>
       <td>
        Las constantes de clase ahora están tipadas.
       </td>
      </tr>

      <tr>
       <td>8.0.0</td>
       <td>
        <span class="methodname"><a href="reflectionclassconstant.export.php" class="methodname">ReflectionClassConstant::export()</a></span> ha sido eliminada.
       </td>
      </tr>

     </tbody>
    
   </table>

  </div>
 </div>

 







































































































<h2>Tabla de contenidos</h2><ul class="chunklist chunklist_reference"><li><a href="reflectionclassconstant.construct.php">ReflectionClassConstant::__construct</a> — Construye una ReflectionClassConstant</li><li><a href="reflectionclassconstant.export.php">ReflectionClassConstant::export</a> — Exporta</li><li><a href="reflectionclassconstant.getattributes.php">ReflectionClassConstant::getAttributes</a> — Verifica los atributos</li><li><a href="reflectionclassconstant.getdeclaringclass.php">ReflectionClassConstant::getDeclaringClass</a> — Obtiene la clase declarante</li><li><a href="reflectionclassconstant.getdoccomment.php">ReflectionClassConstant::getDocComment</a> — Obtiene el comentario de documentaci&oacute;n</li><li><a href="reflectionclassconstant.getmodifiers.php">ReflectionClassConstant::getModifiers</a> — Obtiene los modificadores de la constante de clase</li><li><a href="reflectionclassconstant.getname.php">ReflectionClassConstant::getName</a> — Obtiene el nombre de la constante</li><li><a href="reflectionclassconstant.gettype.php">ReflectionClassConstant::getType</a> — Devuelve el tipo de una constante de clase</li><li><a href="reflectionclassconstant.getvalue.php">ReflectionClassConstant::getValue</a> — Obtiene el valor</li><li><a href="reflectionclassconstant.hastype.php">ReflectionClassConstant::hasType</a> — Verifica si una constante de clase tiene un tipo</li><li><a href="reflectionclassconstant.isdeprecated.php">ReflectionClassConstant::isDeprecated</a> — Verifica la deprecaci&oacute;n</li><li><a href="reflectionclassconstant.isenumcase.php">ReflectionClassConstant::isEnumCase</a> — Verifica si la constante de clase es un caso de enumeraci&oacute;n</li><li><a href="reflectionclassconstant.isfinal.php">ReflectionClassConstant::isFinal</a> — Verifica si la constante de clase es final</li><li><a href="reflectionclassconstant.isprivate.php">ReflectionClassConstant::isPrivate</a> — Verifica si la constante de clase es privada</li><li><a href="reflectionclassconstant.isprotected.php">ReflectionClassConstant::isProtected</a> — Verifica si la constante de clase es protegida</li><li><a href="reflectionclassconstant.ispublic.php">ReflectionClassConstant::isPublic</a> — Verifica si la constante de clase es p&uacute;blica</li><li><a href="reflectionclassconstant.tostring.php">ReflectionClassConstant::__toString</a> — Devuelve la representaci&oacute;n en forma de string del objeto ReflectionClassConstant</li></ul>
</div>
<?php manual_footer($setup); ?>