Created
December 1, 2017 04:50
-
-
Save devosc/8e8b7d16af0871a60e4d7317312ed989 to your computer and use it in GitHub Desktop.
This file contains 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 base_trait | |
{ | |
protected $prop = []; | |
function __construct() | |
{ | |
var_dump($this->prop); | |
} | |
} | |
class base_class | |
{ | |
use base_trait; | |
} | |
class test_class_property | |
extends base_class | |
{ | |
protected $prop = ['a' => 'b']; | |
} | |
trait overlay_trait | |
{ | |
protected $prop = ['a' => 'b']; | |
} | |
class test_class_overlay | |
extends base_class | |
{ | |
use overlay_trait; | |
} | |
new base_class; | |
new test_class_property; | |
new test_class_overlay; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment