Why would you ever want to do that?
I guess it might never get updated with the latest/current/best PHP for that OS (or maybe it would just be updated/re-installed)
ondrej repo is something you choose to add - maybe, but you make that choice.
I still cannot see any reason to install a out-of-date version of PHP.
Especially major versions < 8 (current) or even future versions (that could have potential problems with the OS)
If you are doing this just to support bad/out-of-date web apps there needs to be a conversation with the support team for that web application. Just because it can be done by using the ondrej repo and Virtualmin doesn’t mean it should be done.
I think you will find that many of the major commercial VPS providers (I know Ionos does) charge their clients extra for maintaining/supporting out-of-date PHP versions.
pop quiz: If I give you a load of Ubuntu OS Version numbers, can you tell me of the top of your head what their system default PHP version is? I can’t
I still cannot see any reason to install a out-of-date version of PHP.
I can, there are many, but my question is not about running a web server which I can do, but more why do i need a separate repo for the additional PHP versions?
No and I can’t remember how to program in Cobol or Algol either but once I used to be able to do that. Ancient history needs to be confined to the past. that is especially true of PHP versions < 7. One day it may well apply to Ubuntu. But for now Ubuntu 20 and 22 are all that matter (other OS types accordingly)
the separate repro - as I said above why should the current OS support anything else?
Ubuntu, in this case, will only support 1 version of PHP per distro release to ensure that everything works as expected within that release. Using a different version of PHP than the one Ubuntu (in this case) could cause system instability problems or instability with other installed software (E.G apache/nginx) The ondrej repo allows you to install other versions of PHP if you prepared to take the risk of an unstable system, which in a production environment is not what you want, but from a PHP developers point of view it allows the developer to edit their code to suit the up and coming version of PHP and to also check backwards compatibility with older versions of PHP.
So recap in a production environment use the maintainers (Ubuntu etc) version if your a php developer install & activate the version you wish to code to.
Downside is the ondrej/remi repros are available to all so you can install whichever at your own peril.