Skip to content

Commit c1c803c

Browse files
[PHP 8.3] New behavior of static properties in traits (#4182)
1 parent 3010cc4 commit c1c803c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

language/oop5/traits.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,13 @@ Example::doSomething();
423423
</example>
424424
<example xml:id="language.oop5.traits.static.ex3">
425425
<title>Static Properties</title>
426+
<caution>
427+
<simpara>
428+
Prior to PHP 8.3.0, static properties were shared across all classes
429+
using the trait. As of PHP 8.3.0, each class using the trait has its
430+
own copy of the static property.
431+
</simpara>
432+
</caution>
426433
<programlisting role="php">
427434
<![CDATA[
428435
<?php

0 commit comments

Comments
 (0)