Skip to content
Open
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
15 changes: 10 additions & 5 deletions reference/reflection/reflectionclass/setstaticpropertyvalue.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<refentry xml:id="reflectionclass.setstaticpropertyvalue" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>ReflectionClass::setStaticPropertyValue</refname>
<refpurpose>Sets public static property value</refpurpose>
<refpurpose>Sets static property value</refpurpose>
</refnamediv>

<refsect1 role="description">
Expand All @@ -14,12 +14,11 @@
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
</methodsynopsis>
<simpara>
Sets the value of a public static property.
If the property is private or protected, the method will fail.
Sets the value of a static property, regardless of its visibility.
</simpara>
<simpara>
<methodname>ReflectionProperty::setValue</methodname> allows setting
the value of public, private, and protected properties.
<methodname>ReflectionProperty::setValue</methodname> can also be
used to set the value of static properties.allows setting.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
used to set the value of static properties.allows setting.
used to set the value of static properties.

looks like this was left over

</simpara>
</refsect1>

Expand Down Expand Up @@ -73,6 +72,12 @@
threw a <classname>ReflectionException</classname>.
</entry>
</row>
<row>
<entry>7.4.9</entry>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there should also be documentation of which minor (non-patch) version of PHP this was first changed in, e.g. it could be that 7.4.9 was released after 8.0.0 and thus PHP 8.0 only allows public static properties, or that 7.4.9 was before 8.0.0 and the change was also in 8.0.0, but without further detail a reader would need to investigate

<entry>
This method can now set static properties regardless of their visibility.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
Expand Down