I am new to using Linux and I broke some php settings while tampering.
If I execute a php script containing: phpinfo(); it shows the php versions as 5.
phpinfo();
Here is more interactive way:
update-alternatives --config php
You'll see the list of all available versions and select one of them