On my new Mac Air M2
, I downloaded VSCode
and then I downloaded XAMPP 7.4.3
in /Applications
folder, because I wanted to use PHP 7.4.3
.
Next, I downloaded Homebrew
and installed PHP
. It installed PHP 8.2.5
.
So now the problem is my XAMPP
is using PHP 7.4.3
and VSCode
is using PHP 8.2.5
.
I also downloaded composer
from brew
. My composer.json
file requires minimum PHP 8.1
.
However, I want to work in PHP 7.4.3
.
When I run php -v
in VSCode
I get PHP 8.2.5
, and when I save a file with php_info();
in htdocs
and open with a browser, I get PHP 7.4.3
.
So it is clear that XAMPP
is using PHP 7.4.3
and VSCode
is using PHP 8.2.5
.
What should I do to make VSCode
use PHP 7.4.3
?