I have multiple PHPs (8.1 and 7.3). If I execute php -v
then I get 7.3.
I need to execute some command with PHP for magento 2 e.g. php bin/magento cache:flush
, but I need to call it with php 8.1 for a certain folder (/var/www/company) but I don't want to always have to specify my php 8 binary e.g. php8.1 bin/magento cache:flush
to make it work.
Is there a way to make it always use PHP 8.1 IF I am in that specific directory?