1
Good afternoon guys, I have a problem with this line of code, someone knows why?
Parse error: syntax error, Unexpected T_OBJECT_OPERATOR in /home/Storage/2/3e/Eb/noticiasdasgerais/public_html/yteste/Controller/index.php on line 7
Section of line 7:
public function indexAction() {
if (isset($_POST['busca']) && !empty($_POST['busca'])) {
$busca = addslashes($_POST['busca']);
$this->autos = (new ModelAuto)->get_all_busca($busca); //Linha 7
} else {
$this->autos = (new ModelAuto)->get_autos_destaque();
}
$dados = $this->get_autos();
Tpl::View("site/index", $dados);
}
Thanks in advance!
Which version of php you’re using?
– rray
The version is 5.2.
– Márvin Edge
This syntax only works from php5.4 forward.
– rray