php artisan serve gives me PHP parse error , syntax error , unexpected '=' in Arr.php on line 388

Posted July 14, 2019 11.4k views
PHPLAMP StackPHP FrameworksDebian 9

Debian 9
Apache 2
PHP 7.0.33
installed composer
installed laravel globally

Attempted to update to PHP 7.2 by…
sudo apt update
sudo apt install php7.2 but get error unable to locate package

the Arr.php file is in \vendor\laravel\framework\src\Illuminate\Support

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer


Indeed I believe that this is due to the PHP version, can you confirm your current PHP version?

You could try following the steps here on how to install PHP 7.2 on Debain:

Hope that this helps!