|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74922 Composed class has fatal error with duplicate, equal const properties
Submitted: 2017-07-14 05:31 UTC Modified: -
From: walle dot sthlm at gmail dot com Assigned:
Status: Closed Package: Class/Object related
PHP Version: Irrelevant OS: *
Private report: No CVE-ID: None
 [2017-07-14 05:31 UTC] walle dot sthlm at gmail dot com
The following snippet results in the "definition differs and is considered incompatible" fatal error in 5.6+. 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;}


Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-11-02 20:06 UTC]
Automatic comment on behalf of
Log: Fix #74922 - Try to resolve constants when importing trait properties
 [2017-11-02 20:06 UTC]
-Status: Open +Status: Closed
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Dec 08 09:01:27 2023 UTC