How to run a different php version in the subdomain/addon domain

The main php version is set within the php selector.
https://kb.stablepoint.com/docs/how-to-change-your-php-version-in-cpanel

If you want to keep this configuration and set a different php version to a domain under the same Cpanel account, place the below code in the .htaccess file of the relevant addon domain/subdomain.

AddHandler application/x-httpd-alt-php74___lsphp .php

Then just change the version with modifying “…php74…” to the one you want to set.