function $this->info[0](){
}
function $this->info[0](){
}
You can not do this in PHP. The most that can be done is a dynamic method call, but not a statement:
class Aluno {
public function __construct($nome)
{
$this->nome = $nome;
}
public function nome()
{
return $this->nome;
}
}
The call could be made like this:
$aluno = new Aluno('Wallace');
$aluno->{$this->info[0]}();
What you are trying to do in your example causes a syntax error.