<?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 => 'de',
  ),
  'this' => 
  array (
    0 => 'reflectionclass.getdefaultproperties.php',
    1 => 'ReflectionClass::getDefaultProperties',
    2 => 'Gets default properties',
  ),
  'up' => 
  array (
    0 => 'class.reflectionclass.php',
    1 => 'ReflectionClass',
  ),
  'prev' => 
  array (
    0 => 'reflectionclass.getconstructor.php',
    1 => 'ReflectionClass::getConstructor',
  ),
  'next' => 
  array (
    0 => 'reflectionclass.getdoccomment.php',
    1 => 'ReflectionClass::getDocComment',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/reflection/reflectionclass/getdefaultproperties.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="reflectionclass.getdefaultproperties" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ReflectionClass::getDefaultProperties</h1>
  <p class="verinfo">(PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">ReflectionClass::getDefaultProperties</span> &mdash; <span class="dc-title">Gets default properties</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-reflectionclass.getdefaultproperties-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>ReflectionClass::getDefaultProperties</strong></span>(): <span class="type"><a href="language.types.array.php" class="type array">array</a></span></div>

  <p class="para rdfs-comment">
   Gets default properties from a class (including inherited properties).
  </p>
  <blockquote class="note"><p><strong class="note">Hinweis</strong>: 
   <p class="para">
    This method only works for static properties when used on internal classes.
    The default value of a static class property can not be tracked when using
    this method on user defined classes.
   </p>
  </p></blockquote>
 </div>


 <div class="refsect1 parameters" id="refsect1-reflectionclass.getdefaultproperties-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">Diese Funktion besitzt keine Parameter.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-reflectionclass.getdefaultproperties-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   An <span class="type"><a href="language.types.array.php" class="type array">array</a></span> of default properties, with the key being the name of
   the property and the value being the default value of the property or <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>
   if the property doesn&#039;t have a default value. The function does not distinguish
   between static and non static properties and does not take visibility modifiers
   into account.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-reflectionclass.getdefaultproperties-examples">
  <h3 class="title">Beispiele</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Beispiel #1 <span class="methodname"><strong>ReflectionClass::getDefaultProperties()</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 /></span><span style="color: #007700">class </span><span style="color: #0000BB">Bar </span><span style="color: #007700">{<br />    protected </span><span style="color: #0000BB">$inheritedProperty </span><span style="color: #007700">= </span><span style="color: #DD0000">'inheritedDefault'</span><span style="color: #007700">;<br />}<br /><br />class </span><span style="color: #0000BB">Foo </span><span style="color: #007700">extends </span><span style="color: #0000BB">Bar </span><span style="color: #007700">{<br />    public </span><span style="color: #0000BB">$property </span><span style="color: #007700">= </span><span style="color: #DD0000">'propertyDefault'</span><span style="color: #007700">;<br />    private </span><span style="color: #0000BB">$privateProperty </span><span style="color: #007700">= </span><span style="color: #DD0000">'privatePropertyDefault'</span><span style="color: #007700">;<br />    public static </span><span style="color: #0000BB">$staticProperty </span><span style="color: #007700">= </span><span style="color: #DD0000">'staticProperty'</span><span style="color: #007700">;<br />    public </span><span style="color: #0000BB">$defaultlessProperty</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #0000BB">$reflectionClass </span><span style="color: #007700">= new </span><span style="color: #0000BB">ReflectionClass</span><span style="color: #007700">(</span><span style="color: #DD0000">'Foo'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$reflectionClass</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getDefaultProperties</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>Das oben gezeigte Beispiel erzeugt folgende Ausgabe:</p></div>
    <div class="example-contents screen">
<div class="annotation-interactive examplescode"><pre class="examplescode">array(5) {
   [&quot;staticProperty&quot;]=&gt;
   string(14) &quot;staticProperty&quot;
   [&quot;property&quot;]=&gt;
   string(15) &quot;propertyDefault&quot;
   [&quot;privateProperty&quot;]=&gt;
   string(22) &quot;privatePropertyDefault&quot;
   [&quot;defaultlessProperty&quot;]=&gt;
   NULL
   [&quot;inheritedProperty&quot;]=&gt;
   string(16) &quot;inheritedDefault&quot;
}</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-reflectionclass.getdefaultproperties-seealso">
  <h3 class="title">Siehe auch</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="methodname"><a href="reflectionclass.getproperties.php" class="methodname" rel="rdfs-seeAlso">ReflectionClass::getProperties()</a> - Gets properties</span></li>
    <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.getproperty.php" class="methodname" rel="rdfs-seeAlso">ReflectionClass::getProperty()</a> - Gets a ReflectionProperty for a class's property</span></li>
   </ul>
  </p>
 </div>


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