Created
February 26, 2016 18:12
-
-
Save vegvari/0fb6ab27be4f54130f44 to your computer and use it in GitHub Desktop.
PHP facepalm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| trait foo | |
| { | |
| public function bar() {} | |
| } | |
| class bar | |
| { | |
| use foo; | |
| public function __construct() {} | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace fuck_you_php; | |
| trait foo | |
| { | |
| public function bar() {} | |
| } | |
| class bar | |
| { | |
| use foo; | |
| public function __construct() {} | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
First one: Fatal error: bar has colliding constructor definitions coming from traits
Second one: works fine