Re: PHP command line version

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> Date: Wednesday, January 29, 2020 21:17:17 +1300
> From: Philip <philip@xxxxxxxxx>
>
> 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.



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux