Running php -v usually prints a PHP release number, its CLI designation and details about the Zend engine or build. It is a fast first check when diagnosing PHP compatibility or confirming which binary a shell launches.

The command does not necessarily report the version serving a website. Servers may have one PHP binary for command-line jobs and another for PHP-FPM, Apache or a hosting panel. Containers add another possible difference between the host shell and the runtime inside the deployed image.

A version number alone may also be insufficient for security checks. Linux distributors and hosting vendors sometimes backport fixes to an older upstream version, leaving the apparent PHP version unchanged while changing the package release.

Use php -v to identify the CLI runtime, not as your only proof of patch status. Combine it with the package build identifier, vendor advisory and direct verification of the web-facing PHP handler.