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
Asked
Active
Viewed 3,742 times
-2
-
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 Answers
-1
Please check the following this may fix the problem
- check the alias given to composer to point to appropriate version
- try uninstalling or upgrading your Mammp or your verserver and remove cache data.
- if you change php version in command line. check it after restart of your PC

Ali Mashal
- 24
- 5
-
thank you very much Mr Ali Mashl. the first option has solved my problem. – Reza Sep 30 '20 at 09:28