Created
September 22, 2021 13:20
-
-
Save RuSPanzer/c8b73c6311411a79a67cb8eec5ff8d6c 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 | |
class B | |
{ | |
public function Do() { echo "B";} | |
} | |
trait T | |
{ | |
public function Do() { echo "T";} | |
} | |
class C extends B | |
{ | |
use T; | |
public function Do() { echo "C";} | |
public function RunParent(){parent::Do();} | |
public function Run(){$this->Do();} | |
} | |
$cl = new C; | |
$cl->Run(); | |
$cl->RunParent(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment