As per how to select versions easily, the Symfony project provides a Symfony CLI and one of the features it provides is checking for a `.php-version` file in the current directory and selecting the correct php binary from the PATH accordingly.
I use that when I'm dealing with projects on different versions.
Well that's the thing: I don't know anyone who actively develops in Ruby, Python, Perl or Node that uses the OS-packaged runtimes. The system packages and the language-specific package managers live in different universes.
I've seen this situation blamed on both OS packagers or language ecosystems, but now I just think the goals between the two just are fundamentally at odds.