I am running drush version 11.2.1 (I believe this is the correct version for a Drupal 9 site), and it tells me the PHP-version is 8.2.4:

$ drush core-status --fields=php-version
PHP version : 8.2.4 

This is the PHP version used for the CLI, but it is not the version set up to be used by the webserver (apache2), which is 8.1.17 (as reported in the "Status report" in the UI).

How can I check what version of PHP that the web-server is set up to use from the CLI?

Comments

fred_k’s picture

curl -I domain-name.com  If force redirect to https is enabled, prepend with https://  Or use wget -S domain-name.com