<?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 => 'en',
  ),
  'this' => 
  array (
    0 => 'reflectionclass.getstaticpropertyvalue.php',
    1 => 'ReflectionClass::getStaticPropertyValue',
    2 => 'Gets static property value',
  ),
  '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' => 'en',
    '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">Gets static property value</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-reflectionclass.getstaticpropertyvalue-description">
  <h3 class="title">Description</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">
   Gets the value of a static property on this class.
  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-reflectionclass.getstaticpropertyvalue-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">name</code></dt>
     <dd>
      <p class="para">
       The name of the static property for which to return a value.
      </p>
     </dd>
    
    
     <dt><code class="parameter">def_value</code></dt>
     <dd>
      <p class="para">
       A default value to return in case the class does not declare a static
       property with the given <code class="parameter">name</code>. If the property does
       not exist and this argument is omitted, a
       <span class="classname"><a href="class.reflectionexception.php" class="classname">ReflectionException</a></span> is thrown.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-reflectionclass.getstaticpropertyvalue-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   The value of the static property.
  </p>
 </div>

 
 <div class="refsect1 examples" id="refsect1-reflectionclass.getstaticpropertyvalue-examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Example #1 Basic usage of <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">'Red'</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>The above example will output:</p></div>
    <div class="example-contents screen">
<div class="annotation-interactive examplescode"><pre class="examplescode">string(3) &quot;Red&quot;</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-reflectionclass.getstaticpropertyvalue-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="methodname"><a href="reflectionclass.getstaticproperties.php" class="methodname" rel="rdfs-seeAlso">ReflectionClass::getStaticProperties()</a> - Gets static properties</span></li>
    <li><span class="methodname"><a href="reflectionclass.setstaticpropertyvalue.php" class="methodname" rel="rdfs-seeAlso">ReflectionClass::setStaticPropertyValue()</a> - Sets public static property value</span></li>
   </ul>
  </p>
 </div>


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