If you are running into issues with a version of PHP running and want to swap the active PHP to a different version you can simply run the command below on Ubuntu to get an interactive menu to swap PHP versions…

sudo update-alternatives --config php

Sources:

https://stackoverflow.com/questions/42619312/switch-php-versions-on-commandline-ubuntu-16-04/48336881

And: