How can I prevent an unexpected Syntax error?

96 views Asked by At

I tried to execute this command in the terminal:

php bin/console cache:clear --env=prod --no-debug

But I get the following error message:

Parse error: syntax error, unexpected '?' in /is/htdocs/myhost/www/project/bin/console on line 26
1

There are 1 answers

0
Webber On BEST ANSWER

Symfony4 requires PHP v7.1.3 or higher.

Check your PHP version using php -v.

If you have the correct version try running composer install. This will install any missing dependencies and should fix the error.