Created
December 10, 2016 16:51
-
-
Save gorkamu/c952a7a86a51e8123531b1844513eec3 to your computer and use it in GitHub Desktop.
Ejemplo de enlace no estático en tiempo de ejecución
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 Taza | |
| { | |
| public static function getName() | |
| { | |
| echo 'Soy una taza'; | |
| } | |
| public static function queSoy() | |
| { | |
| self::getName(); | |
| } | |
| } | |
| class Tetera extends Taza | |
| { | |
| public static function getName() | |
| { | |
| echo 'Soy una tetera'; | |
| } | |
| } | |
| Tetera::queSoy(); // 'Soy una taza' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment