Created
October 30, 2015 14:04
-
-
Save mcjwsk/7504bc002a0b8c1e08b7 to your computer and use it in GitHub Desktop.
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 | |
class SomeParent { | |
public function test() { | |
echo 'parent'; | |
} | |
} | |
class Element1 extends SomeParent { | |
public function test() { | |
parent::test(); | |
$this->test(); | |
} | |
} | |
class Element2 extends Element1 { | |
public function test() { | |
parent::test(); | |
} | |
} | |
$el = new Element2(); | |
$el->test(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment