We help IT Professionals succeed at work.
Get Started

Unexpected ? in Laravel

Bruce Gust
Bruce Gust asked
Last Modified: 2020-03-26
So, I'm on vacation and wanted to work a little bit on a project I'm trying to wrap up.

I bring my project on a separate drive, install it in my WAMP directory and go to run "php aristan migrate" and this is what I get:

brucegust@BRUCEGUST7EFC MINGW64 /c/wamp64/www/new_nomas (bruce)
$ php artisan migrate

Parse error: syntax error, unexpected '?' in C:\wamp64\www\new_nomas\vendor\lara
vel\framework\src\Illuminate\Foundation\helpers.php on line 500

brucegust@BRUCEGUST7EFC MINGW64 /c/wamp64/www/new_nomas (bruce)
$ php -v
PHP 5.6.40 (cli) (built: Jan  9 2019 15:10:36)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies

brucegust@BRUCEGUST7EFC MINGW64 /c/wamp64/www/new_nomas (bruce)
$ php artisan laravel

Parse error: syntax error, unexpected '?' in C:\wamp64\www\new_nomas\vendor\laravel\framework
\src\Illuminate\Foundation\helpers.php on line 500

Open in new window

I'm running PHP 7 on my box. The Laravel project I'm working on is also coming from a PHP 7 dynamic, so I don't know where the PHP 5.6.4 is coming from, but from what I've been able to determine, the error that I'm getting is because of PHP mismatch.

How do I fix it?
Watch Question
Most Valuable Expert 2020
Most Valuable Expert 2018
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant

An Experts Exchange subscription includes unlimited access to online courses.

Get Started
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE