ja, das ist der korrekte Weg, siehe auch "man lcphp":
Code
DESCRIPTION
lcphp allows switching the command line version of PHP. It first checks if the file ~/conf/php exists (which should be a symbolic link to the actual PHP binary to be
executed). If yes, then the linked binary is run.
The search order for PHP binaries is:
~/conf/php
/usr/bin/php.default
/usr/bin/php7
/usr/bin/php7.3
/usr/bin/php7.2
/usr/bin/php7.1
/usr/bin/php7.0
/usr/bin/php5
OPTIONS
All options and parameters are forwarded to the final PHP interpreter without any modification. lcphp does not have any own options or parameters.
INSTALLATION
This tool should be installed at /usr/bin/php or /usr/local/bin/php, replacing the default PHP binary.
DEBIAN/UBUNTU LINUX
On Debian/GNU Linux or Ubuntu Linux use the update-alternatives(8) utility.
Installation:
update-alternatives --install /usr/bin/php php /usr/bin/lcphp 100
Removal:
update-alternatives --remove php /usr/bin/lcphp
Alles anzeigen