Created
July 13, 2015 16:43
-
-
Save ryaan-anthony/a008ad0f745076fed0e7 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 X | |
| { | |
| const X = 'x'; | |
| static function foo() | |
| { | |
| return static::X . self::X . PHP_EOL; | |
| } | |
| } | |
| class Y extends X | |
| { | |
| const X = 'y'; | |
| static function foo() | |
| { | |
| return parent::foo(); | |
| } | |
| } | |
| echo Y::foo(); // prints yx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment