Skip to content

Instantly share code, notes, and snippets.

@pedrolopesme
Created August 7, 2008 20:19
Show Gist options
  • Save pedrolopesme/4486 to your computer and use it in GitHub Desktop.
Save pedrolopesme/4486 to your computer and use it in GitHub Desktop.
<?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