CMD picking the wrong PHP version

Опубликовано: 26 Август 2024
на канале: Adnan Afzal
34
0

Sometimes CMD picks the wrong version of PHP and not the one we install via XAMPP or MAMP.

Let’s say you have downloaded and installed XAMPP or MAMP with the latest PHP. But when you run the command “php -v” in your terminal, it displays the wrong version of PHP (typically the previously installed version of PHP). This is a common issue when you try to upgrade your PHP version. Previously, you could have upgraded the PHP version easily using Homebrew. But nowadays, Homebrew itself has become too complex and it has its errors.

Source code: