Search code examples
phplaravel-5.3

Deploy Laravel project on DreamHost server


I am trying to deploy a Laravel (v 5.3) project on the DreamHost server (PHP v 5.5.38).

When I try an artisan command, I get

Parse error: syntax error, unexpected '.', 
  expecting '&' or variable (T_VARIABLE)
  in /home/laravelProjectName/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php on line 475

Help?


Solution

  • You need PHP version >= 5.6.4. The helpers uses the splat operator (a.k.a. scatter operator):

    function name(...$args) {}
    

    This allows you to capture an unlimited number of variables passed as arguments to the function.

    name(1, 2, 3, 4);