Created
December 10, 2016 17:04
-
-
Save gorkamu/f56a8d82a5ac4515eedc3978ae631d77 to your computer and use it in GitHub Desktop.
Ejemplo de enlace 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 Pantoja | |
{ | |
protected static $nombre = 'Isabel Pantoja'; | |
public static function comoMeLlamo() | |
{ | |
return static::$nombre; | |
} | |
} | |
class Paquirrin extends Pantoja | |
{ | |
protected static $nombre = 'Paquirrin'; | |
} | |
echo Paquirrin::comoMeLLamo(); // 'Paquirrin' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment