Created
August 7, 2008 20:19
-
-
Save pedrolopesme/4486 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
<?php | |
class OlaMundo{ | |
static $nomeDoUsuario; | |
/** | |
* Escreve Ola Mundo | |
* | |
* @author Chuck Norris. | |
*/ | |
function imprime(){ | |
echo( "Ola Mundo e ola " . self::$nomeDoUsuario . PHP_EOL ); | |
} | |
} | |
OlaMundo::$nomeDoUsuario = "Pedro Mendes"; | |
$meuOlaMundo = new OlaMundo(); | |
$meuOlaMundo->imprime(); | |
$seuOlaMundo = new OlaMundo(); | |
$seuOlaMundo->imprime(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment