Doc #62537 [Ver->Csd]: Composed class has fatal error with duplicate, equal array properties
| From: | nikic@php.net | Date: | Mon, 15 Jan 2018 11:52:13 +0000 |
| Subject: | Doc #62537 [Ver->Csd]: Composed class has fatal error with duplicate, equal array properties | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-15338@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=62537&edit=1
ID: 62537
Updated by: nikic@php.net
Reported by: jeremeamia at gmail dot com
Summary: Composed class has fatal error with duplicate, equal
array properties
-Status: Verified
+Status: Closed
Type: Documentation Problem
Package: Class/Object related
Operating System: *
PHP Version: Irrelevant
-Assigned To:
+Assigned To: nikic
Block user comment: N
Private report: N
New Comment:
Closing as docs have been fixed.
Previous Comments:
------------------------------------------------------------------------
[2017-07-13 13:43:26] walle dot sthlm at gmail dot com
The following snippet results in the "definition differs and is considered incompatible"
fatal error in 7.0+. Can this be considered as a bug?
const VALUE = true;
trait Foo {public $var = VALUE;}
trait Bar {public $var = VALUE;}
class Baz {use Foo, Bar;}
https://3v4l.org/kkHFe
------------------------------------------------------------------------
[2017-03-13 18:34:56] tularis@php.net
Automatic comment from SVN on behalf of tularis
Revision: http://svn.php.net/viewvc/?view=revision&revision=342111
Log: Documents the issue described in bug 62537.
--
Provided by Pedro Magalhães (mail@pmmaga.net)
------------------------------------------------------------------------
[2017-02-09 17:40:36] mail at pmmaga dot net
I've included a patch for the documentation on this ticket as well.
------------------------------------------------------------------------
[2017-02-07 23:45:09] requinix@php.net
The documentation is indeed out of date.
No E_STRICT in PHP 7:
- https://3v4l.org/Jafoi matching in two traits
- https://3v4l.org/pQYTl matching in traits and class
Conflicting definitions:
- https://3v4l.org/brZt0 conflict between traits
- https://3v4l.org/umfVE conflict between trait and class
------------------------------------------------------------------------
[2017-02-07 23:09:12] mail at pmmaga dot net
In PHP7.0, this E_STRICT was dropped as described in the 7.0 docs: http://php.net/manual/en/migration70.incompatible.php
> Same (compatible) property in two used traits - Notice removed, triggers no error
However, the documentation on traits still mentions the E_STRICT.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=62537
--
Edit this bug report at https://bugs.php.net/bug.php?id=62537&edit=1