mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
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:
parent
cc8cbded16
commit
e4add76743
1 changed files with 3 additions and 4 deletions
|
@ -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
|
||||
}
|
||||
?>
|
||||
|
|
Loading…
Reference in a new issue