Get all versions of PHP installed on the system
Published by Nicholas Dunbar on May 15th, 2013
This will list (all) the PHP(s) on the system and then grep the version number(s).
whereis php | tr ' ' '\n' | grep -E "^/.*?php$" | xargs -I {} echo {} -v | sh |& grep -v "is a"