Maybe create a dummy domain like example.com and assign php5 to it and use the php info icon to see if its installed. I haven’t seen php5 for many years and prob a security risk if a domain is using it..
I think this is more a ‘bug check’. I did a quick check and quickly found the Debian repository is 5.6. Never did get a clear picture of Ubuntu as search didn’t even land me the repository. Not interested in whipping this dead horse though.
I don’t know how you’d have PHP 5 on Ubuntu 22.04. It seems like it’d be impossible to get there, unless you upgraded from an older Ubuntu version and somehow convinced it to keep the old package. There are no maintained PHP 5 packages available anywhere for Ubuntu 22.04.
While we’re on the topic, PHP 7 is also deprecated and unmaintained, though I can imagine a path where you’d still have it installed (but shouldn’t, since it is unmaintained and has been for some time). The default PHP for 22.04 is 8.1, I believe.