Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Pessoa{
- const nome = "Geicy";
- public function exibirNome(){
- echo self::nome;
- }
- }
- class Geicy extends Pessoa{
- const nome = "Rodrigues";
- public function exibirNome(){
- echo parent::nome;
- }
- }
- $geicy = new Geicy();
- $geicy->exibirNome();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement