<?php
interface ContaUsuario {
public function carregue($id, $nome);
}
class Conta implements ContaUsuario {
protected $id;
private $nome;
public function carregue($id,$nome){
$this->id = $id;
$this->nome = $nome;
}
}
class Aluno extends Conta {}
$aluno = new Aluno();
echo "Instância de Aluno: " . (($aluno instanceof Aluno) ? "Sim" : "Não"), PHP_EOL;
echo "Instância de Conta: " . (($aluno instanceof Conta) ? "Sim" : "Não"), PHP_EOL;
echo "Instância de ContaUsuario: " . (($aluno instanceof ContaUsuario) ? "Sim" : "Não"), PHP_EOL;
PD9waHAKCmludGVyZmFjZSBDb250YVVzdWFyaW8gewogICAgcHVibGljIGZ1bmN0aW9uIGNhcnJlZ3VlKCRpZCwgJG5vbWUpOwp9CgpjbGFzcyBDb250YSBpbXBsZW1lbnRzIENvbnRhVXN1YXJpbyB7CiAgIHByb3RlY3RlZCAkaWQ7CiAgIHByaXZhdGUgJG5vbWU7CgogICBwdWJsaWMgZnVuY3Rpb24gY2FycmVndWUoJGlkLCRub21lKXsKICAgICAgJHRoaXMtPmlkID0gJGlkOwogICAgICAkdGhpcy0+bm9tZSA9ICRub21lOwoKICAgfQp9CgpjbGFzcyBBbHVubyBleHRlbmRzIENvbnRhIHt9CgokYWx1bm8gPSBuZXcgQWx1bm8oKTsKCmVjaG8gIkluc3TDom5jaWEgZGUgQWx1bm86ICIgLiAoKCRhbHVubyBpbnN0YW5jZW9mIEFsdW5vKSA/ICJTaW0iIDogIk7Do28iKSwgUEhQX0VPTDsKZWNobyAiSW5zdMOibmNpYSBkZSBDb250YTogIiAuICgoJGFsdW5vIGluc3RhbmNlb2YgQ29udGEpID8gIlNpbSIgOiAiTsOjbyIpLCBQSFBfRU9MOwplY2hvICJJbnN0w6JuY2lhIGRlIENvbnRhVXN1YXJpbzogIiAuICgoJGFsdW5vIGluc3RhbmNlb2YgQ29udGFVc3VhcmlvKSA/ICJTaW0iIDogIk7Do28iKSwgUEhQX0VPTDs=