I set up PHP-FPM to have different versions of PHP for different folders. This was necessary due to legacy code and was achieved using the apache's .htaccess
.
My question is: does anyone have a simple elegant way to do this in CLI? I was thinking maybe have a file in the folder indicating the desired version of PHP to run, but unsure of how to go about it.
My expected result is that when I run php ...
in folder A, it runs with PHP 7.4 and when I do the same php ...
in folder B, it runs with PHP 8.1
Thank you.