PHP discovery matched only the exact name php on PATH, so Debian and
Ubuntu installs with several versions (ppa:ondrej/php, packages.sury.org)
listed only the alternatives default. PATH directories are now also
scanned for php<version> (php8.1, php81), skipping shim directories and
the php-cgi / phpize / phpdbg helpers. The plain php comes first, so
deduplication by real path keeps /usr/bin/php over the php8.3 it links to.