Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions reference/reflection/reflectionproperty/getdefaultvalue.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@
between a &null; default value and an uninitialized typed property.
Use <methodname>ReflectionProperty::hasDefaultValue</methodname> to detect the difference.
</simpara>
<note>
<simpara>
For <link linkend="language.oop5.decon.constructor.promotion">promoted properties</link>,
the default value is only applied to the constructor parameter, not to the property itself,
so this method returns &null; and <methodname>ReflectionProperty::hasDefaultValue</methodname>
returns &false;. Use <methodname>ReflectionParameter::getDefaultValue</methodname>
on the matching constructor parameter to get it.
Comment thread
lacatoire marked this conversation as resolved.
</simpara>
</note>
</refsect1>

<refsect1 role="changelog">
Expand Down
Loading