How can you query the PHP version using PHP code?

To query the PHP version using PHP code, you can use the predefined constant `PHP_VERSION`. This constant holds the current PHP version as a string, allowing you to easily retrieve and display the PHP version being used by your server.

$phpVersion = PHP_VERSION;
echo "Current PHP version is: " . $phpVersion;