php - unexpected 'class' (T_CLASS) only on remote (not in local) -
this question has answer here:
- php parse/syntax errors; , how solve them? 11 answers
we developping crm.
in local, have no problem, in remote (ovh), have error message :
parse error: syntax error, unexpected 'class' (t_class), expecting identifier (t_string) or variable (t_variable) or '{' or '$' in /home/dubinfo/www/crm/model/locataire.php on line 126
this code :
public function setvisites($visites) { $this->_visites = checktyper::isarrayofmodel($visites, visitemaisoninvestisseur::class, 'visites', __class__); }
the version of php on remote host (ovh) 5.4.38
using class
name of constant available in php 5.5 only.
to class name can replace visitemaisoninvestisseur::class
get_class(new visitemaisoninvestisseur)
.
or change name of constant. example: visitemaisoninvestisseur::class_name
.
Comments
Post a Comment