Question

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

Debian 9 Apache 2 MariaDb 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


Submit an answer


This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

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.

Bobby Iliev
Site Moderator
Site Moderator badge
July 15, 2019
Accepted Answer

Hello,

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: https://linuxhostsupport.com/blog/how-to-install-php-7-2-on-debian-9/

Hope that this helps! Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel