3

Everything is working perfectly but on running I get this error

PHP Parse error: syntax error, unexpected '?' in htdocs\example\vendor\laravel\framework\src\Illuminate\Foundation\helpers.php on line 500

on line 500

return $factory->of($arguments[0], $arguments[1])->times($arguments[2] ?? null);
1
  • I am also getting this error while deploying in server. I am using laravel 7 Commented Jun 26, 2020 at 15:39

3 Answers 3

5

The ?? operator was introduced in php 7. You should upgrade your php version to the one required by the laravel version you are using.

Sign up to request clarification or add additional context in comments.

Comments

2

Just upgrade the php version into PHP 7.1 (ea-php71) on cpanel using MultiPHP Manager .

Comments

0

It seems your php is lower than version 7.1.3, you need to have version above that. try to run phpinfo(). Hope it helps

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.