repl.it
@anonymous/

PracticalVacantLeopard

PHP (Legacy)

No description

fork
loading
main.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class Dominio {

    protected $teste = 'Variável teste';
    public function getAtributos() {
        return get_object_vars($this);
    }

}

class ClasseQualquer extends Dominio {
    protected $outro = 'Variável outra';
}

$classeQualquer = new ClasseQualquer();
var_export($classeQualquer->getAtributos());
PHP 7.0.8 (Legacy: use the following for new features: Command-line PHP: https://repl.it/languages/php_cli PHP Web Server: https://repl.it/languages/php7