You can run multiple versions of php on the same server.
Running the command that you ran at a command line tells you what the command line is using for PHP. It does not tell you the version that your webserver is running for a specific webpage.
If you only have one version installed... then you need to stop/start the webserver (apache) to have it use the new one. Otherwise the configuration keeps using the old one.
If you have more than one version of PHP installed then you need to tell the webserver which version to use.