From 93b9a05101ebac163e57deb362bf45ff63387f56 Mon Sep 17 00:00:00 2001 From: Maciek Sokolewicz Date: Tue, 14 Mar 2017 12:18:23 +0000 Subject: [PATCH] Documented changes in E_STRICT throwing as of PHP 7.0 for compatible properties in traits (thanks for mentioning this, Sherif) git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@342129 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/oop5/changelog.xml | 8 +++++++- language/oop5/traits.xml | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/language/oop5/changelog.xml b/language/oop5/changelog.xml index 1753f52881..ad5dce71f7 100644 --- a/language/oop5/changelog.xml +++ b/language/oop5/changelog.xml @@ -16,13 +16,19 @@ + + 7.0.0 + + Defining (compatible) properties in two used traits no longer triggers an error. + + 5.6.0 Added: The __debugInfo() method. - + 5.5.0 Added: The ::class magic constant. diff --git a/language/oop5/traits.xml b/language/oop5/traits.xml index 677b8267e3..0737cd95ee 100644 --- a/language/oop5/traits.xml +++ b/language/oop5/traits.xml @@ -20,7 +20,6 @@ composition of behavior; that is, the application of class members without requiring inheritance. - Trait example @@ -240,6 +239,13 @@ class Aliased_Talker { ]]> + + + Prior to PHP 7.0, defining a property in a class with the same name as in a trait + would throw an E_STRICT if the class definition was compatible + (same visibility and initial value). + +