If you came across this error while using the command line its because you must be using php 7 to execute whatever it is you are trying to execute. What happened is that the code is trying to use an operator thats only available in php7+ and is causing a syntax error.
If you already have php 7+ on your computer try pointing the command line to the higher version of php you want to use.
export PATH=/usr/local/[php-7-folder]/bin/:$PATH
Here is the exact location that worked based off of my setup for reference:
export PATH=/usr/local/php5-7.1.4-20170506-100436/bin/:$PATH
The operator thats actually caused the break is the "null coalesce operator" you can read more about it here: