Selecting which version of PHP to use in the command line

KevinF

Verified User
Joined
Mar 22, 2012
Messages
12
Greetings,


I have added PHP 7.2 as my second PHP version today and have switched a few domains over to the new install, which is confirmed working when running a phpinfo() on said domains.

I was wondering if it was possible to access PHP 7.2 as well when using the "php" command in the command line, and if so, how.


Thank you for your time and have a good evening,
Kevin
 
Hello,

For running scripts in a console you could use a full path to a desired PHP /usr/local/php72/bin/php
 
Back
Top