Documents the issue described in bug 62537.

-- 
Provided by Pedro Magalhães (mail@pmmaga.net)

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@342111 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Maciek Sokolewicz 2017-03-13 18:35:13 +00:00
parent cc8cbded16
commit e4add76743

View file

@ -436,9 +436,8 @@ $example->x;
</example>
<para>
If a trait defines a property then a class can not define a property with
the same name, otherwise an error is issued. It is an
<constant>E_STRICT</constant> if the class definition is compatible (same
visibility and initial value) or fatal error otherwise.
the same name unless it is compatible (same visibility and initial value),
otherwise a fatal error is issued.
</para>
<example xml:id="language.oop5.traits.properties.conflicts">
<title>Conflict Resolution</title>
@ -452,7 +451,7 @@ trait PropertiesTrait {
class PropertiesExample {
use PropertiesTrait;
public $same = true; // Strict Standards
public $same = true; // Allowed
public $different = true; // Fatal error
}
?>