There are a few cases where you might want to keep your old version of PHP for compatibility, or preference, but also need a newer or cutting edge version for a particular app (eg. Nextcloud [howto/whyto post to follow]).
Fear not – this CAN be done. Here’s my marginally modified version of the post from here
check if your changes worked using something like this …
php -i | grep "opcache\|YOUR_MOD_NAME"
Once this is done and running, create a test VirtualHost …
This example is set up for PHP 5.6.
If you wanted to use 7.3, you would change this line in the config, and then restart apache2