diff --git a/reference/reflection/reflectionproperty/getdefaultvalue.xml b/reference/reflection/reflectionproperty/getdefaultvalue.xml index 887944dc073b..f144016244fc 100644 --- a/reference/reflection/reflectionproperty/getdefaultvalue.xml +++ b/reference/reflection/reflectionproperty/getdefaultvalue.xml @@ -30,6 +30,15 @@ between a &null; default value and an uninitialized typed property. Use ReflectionProperty::hasDefaultValue to detect the difference. + + + For promoted properties, + the default value is only applied to the constructor parameter, not to the property itself, + so this method returns &null; and ReflectionProperty::hasDefaultValue + returns &false;. Use ReflectionParameter::getDefaultValue + on the matching constructor parameter to get it. + +