Good morning,
I wrote a PHP class
<?php
private $v;
private $v2;
private $v3;
public function __construct(){
printf("Objeto criado com sucesso!");
}
public function setValor(){
$this->$v = "valor";
$this->$v2 = "valor2";
$this->$v3 = "valor3";
}
public function getValor1(){
return $this->$v;
}
public function getValor2(){
return $this->$v2;
}
public function getValor3(){
return $this->$v3;
}
}
$t = new Teste();
$t->setValor();
?>
But I can not access the serValor () method, I always get the GET 500 (Internal Server Error) error, however I do not see anything wrong with the code, can anyone help?