Hello again
That’s not exact, php 8.1 still receive security updates from linux providers, ubuntu 22.04 in my case has security updates (PHP 8.1 included) until 2032. As long as a php version is included in a ubuntu release with support is patched with security updates.
However, plugins should support same php and mysql versions that wordpress support, and actually wordpress 7.1 minimum versions are:
PHP7.4+
MySQL5.5.5+
MariaDB5.5.5+
Regards