If you are hosting websites then it is likely that your server can run different versions of PHP.
Although it is often relatively simple to select which version each website uses, it can be trickier to change the default PHP version running on the server itself.
In Debian 9, run the following commands:
update-alternatives --set php /usr/bin/php7.2 update-alternatives --set phar /usr/bin/phar7.2 update-alternatives --set phar.phar /usr/bin/phar.phar7.2