Re: PHP command line version
| From: | Richard | Date: | Wed, 29 Jan 2020 13:41:32 +0000 |
| Subject: | Re: PHP command line version | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-326994@lists.php.net to get a copy of this message | ||
> Date: Wednesday, January 29, 2020 21:17:17 +1300
> From: Philip <philip@treads.nz>
>
> Is it possible to select the version of php you want to run from
> the command line?
You would explicitly path to the php binary on your call, e.g.,
/usr/bin/php -v [ -v to get the version information]
/usr/local/bin/php -v
If calling from a script, preface the above with "#!".
Obviously you'd need to determine where the php binaries for the
different versions are installed, something that will depend on how
your repositories package php and/or if you install it from source.