-2

I’m using mac os and install MAMP 5.7. when I run PHP -v on the terminal it says PHP version is 7.2 but when I try to create Laravel project I got this error. I don’t know why the composer recognizes that the PHP version in 5.6

this is the error

Reza
  • 328
  • 2
  • 11
  • May be you have multiple php version installed on your system – STA Sep 30 '20 at 05:52
  • @sta would you please tell me how to check that php has installed multiple and how to delete the previous version .? – Reza Sep 30 '20 at 06:03
  • Please share your debugging attempts. PHP 5.6 is out of support since months and should not be used any more. And as the error message tells you: Laravel 6 does not support this outdated version – Nico Haase Sep 30 '20 at 06:21
  • Does this answer your question? [Tell Composer to use Different PHP Version](https://stackoverflow.com/questions/32750250/tell-composer-to-use-different-php-version) – Nico Haase Oct 28 '21 at 07:40

1 Answers1

-1

Please check the following this may fix the problem

  1. check the alias given to composer to point to appropriate version
  2. try uninstalling or upgrading your Mammp or your verserver and remove cache data.
  3. if you change php version in command line. check it after restart of your PC
Ali Mashal
  • 24
  • 5