To specify a particular PHP version via the command line on our shared hosting servers, use the full path to the desired PHP version.
For example:
/opt/keyhelp/php/8.1/bin/php script.php
Alternatively, you can also use the following binds:
keyhelp-php81 script.php
In this example, PHP 8.1 is used to run the script `script.php`. You can replace `8.1` with the desired PHP version, e.g. `7.4`, `8.0`, etc.
Using your own php.ini
You can, of course, also use the PHP command with your own `php.ini` file.
To do this, follow the instructions in the following help article: How do I use my own php.ini / PHP configuration via SSH?
Using PHP Composer
We also offer PHP Composer on our shared hosting servers to support key frameworks; you can easily access this via the SSH command line.
To do this, follow the instructions in the following help article: How do I use PHP Composer via SSH?