<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.reflectionclass.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'es',
  ),
  'this' => 
  array (
    0 => 'reflectionclass.getstaticpropertyvalue.php',
    1 => 'ReflectionClass::getStaticPropertyValue',
    2 => 'Obtiene el valor de una propiedad est&aacute;tica',
  ),
  'up' => 
  array (
    0 => 'class.reflectionclass.php',
    1 => 'ReflectionClass',
  ),
  'prev' => 
  array (
    0 => 'reflectionclass.getstaticproperties.php',
    1 => 'ReflectionClass::getStaticProperties',
  ),
  'next' => 
  array (
    0 => 'reflectionclass.gettraitaliases.php',
    1 => 'ReflectionClass::getTraitAliases',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'es',
    'path' => 'reference/reflection/reflectionclass/getstaticpropertyvalue.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="reflectionclass.getstaticpropertyvalue" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ReflectionClass::getStaticPropertyValue</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.1.2, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">ReflectionClass::getStaticPropertyValue</span> &mdash; <span class="dc-title">Obtiene el valor de una propiedad estática</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-reflectionclass.getstaticpropertyvalue-description">
  <h3 class="title">Descripción</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>ReflectionClass::getStaticPropertyValue</strong></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.mixed.php" class="type mixed">mixed</a></span> <code class="parameter reference">&$def_value</code><span class="initializer"> = ?</span></span>): <span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span></div>

  <p class="para rdfs-comment">
   Obtiene el valor de una propiedad estática de esta clase.
  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-reflectionclass.getstaticpropertyvalue-parameters">
  <h3 class="title">Parámetros</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">name</code></dt>
     <dd>
      <p class="para">
       El nombre de la propiedad estática para la que devolver un valor.
      </p>
     </dd>
    
    
     <dt><code class="parameter">def_value</code></dt>
     <dd>
      <p class="para">
       Un valor predeterminado a devolver en caso de que la clase no declare propiedades
       estáticas con el <code class="parameter">name</code> dado. Si la propiedad no
       existe y se omite este argumento, se
       lanza una <span class="classname"><a href="class.reflectionexception.php" class="classname">ReflectionException</a></span>.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-reflectionclass.getstaticpropertyvalue-returnvalues">
  <h3 class="title">Valores devueltos</h3>
  <p class="para">
   El valor de la propiedad estática.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-reflectionclass.getstaticpropertyvalue-examples">
  <h3 class="title">Ejemplos</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Ejemplo #1 Uso básico de <span class="methodname"><strong>ReflectionClass::getStaticPropertyValue()</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">class </span><span style="color: #0000BB">Apple </span><span style="color: #007700">{<br />    public static </span><span style="color: #0000BB">$color </span><span style="color: #007700">= </span><span style="color: #DD0000">'Rojo'</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #0000BB">$class </span><span style="color: #007700">= new </span><span style="color: #0000BB">ReflectionClass</span><span style="color: #007700">(</span><span style="color: #DD0000">'Apple'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$class</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getStaticPropertyValue</span><span style="color: #007700">(</span><span style="color: #DD0000">'color'</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>El ejemplo anterior mostrará:</p></div>
    <div class="example-contents screen">
<div class="annotation-interactive examplescode"><pre class="examplescode">string(4) &quot;Rojo&quot;</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-reflectionclass.getstaticpropertyvalue-seealso">
  <h3 class="title">Ver también</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="methodname"><a href="reflectionclass.getstaticproperties.php" class="methodname" rel="rdfs-seeAlso">ReflectionClass::getStaticProperties()</a> - Obtiene las propiedades est&aacute;ticas</span></li>
    <li><span class="methodname"><a href="reflectionclass.setstaticpropertyvalue.php" class="methodname" rel="rdfs-seeAlso">ReflectionClass::setStaticPropertyValue()</a> - Define el valor de una propiedad est&aacute;tica p&uacute;blica</span></li>
   </ul>
  </p>
 </div>


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