How to use the same PHP interpreter for both the web-server and the command-line modes?

PHP can have different settings for the command-line mode and web-server modes.
Using the same PHP interpreter for both the web-server and the command-line modes will simplify PHP confoguratio and support.
I do it by removing the command-line PHP interpreter and then symlink it to the web-server interpreter:

rm -rf /etc/php/7.0/cli
ln -s /etc/php/7.0/fpm /etc/php/7.0/cli

See also: