OpenLiteSpeed (OLS) includes a nice “Compile PHP” option under Tools. We can use it to compile different versions of PHP. So, I compiled 7.4.24 and 8.0.11 and the binaries were saved in the folders /usr/local/lsws/lsphp7
& /usr/local/lsws/lsphp8
respectively.
Then I set the default External App to use lsphp7 and created another External App to use lsphp8.