Created
November 17, 2012 17:16
-
-
Save lorenzo/4097781 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
trait foo { function bob() { echo 'from trait'; }} | |
class bar { use foo; } | |
class baz extends bar { function bob() { parent::bob(); echo ' from child'; }} | |
$a = new baz; | |
$a->bob(); | |
//result: from trait from child |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment