Syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) - Remote Server only

1

I have a platform that I developed using Zend Framework 3.0.

This platform works on the site but when I migrated it to the server, it throws multiple errors with this syntax :

  

Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) in /home/gowebsales/vendor/zendframework/zend-form/src/FormElementManager/FormElementManagerV3Polyfill.php online 37

My platform is running PHP in version 5.6. The server is running 5.4.

What changes do I need to make to resolve this problem?

    
asked by anonymous 11.07.2017 / 18:03

1 answer

0

This is a problem in class name resolution. The cause of this you yourself said in the question: PHP versions are different in development and publishing server.

A priori you only have two options: 1 ) Make your application run on the correct version of PHP - regardless of how it will be done; and 2 ) Adapt your application to run in version 5.4 of PHP.

    
11.07.2017 / 18:26