Tom Thomson
Tom Thomson

Reputation: 442

Laravel "Parse error" after clean Install

After installing Laravel 5.7 on Ubuntu 16.04 64 Bit

This is the error:

Parse error: syntax error, unexpected '=' in [CENSORED]/vendor/laravel/framework/src/Illuminate/Support/Arr.php on line 388

php -v outputs

PHP 7.2.11-2+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Oct 15 2018 11:40:04) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
        with Zend OPcache v7.2.11-2+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999                                                                                                                                   -2018, by Zend Technologies

Already reinstalled / rebooted

Running VestaCP with Apache and Nginx

Upvotes: 3

Views: 1472

Answers (1)

Omid Ahmadyani
Omid Ahmadyani

Reputation: 1450

this code run only in php 7.1 and 7.2 and this syntax show you use php 7.0 change your php version to 7.1 or 7.2 and this solve your problem

Upvotes: 2

Related Questions