PHP7: Parse error: syntax error, unexpected ‘new’ (T_NEW)

PHP7: Parse error: syntax error, unexpected ‘new’ (T_NEW)

You might see that error when upgrading from PHP5 to PHP7

your code might look like this:

$this->smilies =& new smilies_package($this->current_smilies);

 

Solution: just remove & , it will fix.

Leave a Reply

Your email address will not be published. Required fields are marked *