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

July 14, 2019 2.2k views
PHP LAMP Stack PHP Frameworks Debian 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

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!

  • Thanks Bobby, that did it. I upgraded from 7.0.33 to 7.2.20 and now I can run ‘php artisan serve’ in my project folder.

    • Perfect! I’m happy to hear that it is working now! Make sure to mark the answer as correct so that other people would know that this fixed the issue for you.


Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!