Function name: phpversion()
Function description: Get the version number of the current PHP.
usage:
string phpversion ( void )
Example:
echo "当前PHP版本号是:" . phpversion();
Output:
当前PHP版本号是:7.4.10
Notes:
- This function requires no parameters.
- The returned version number is a string indicating the current version of PHP.
- The format of the version number is usually "major version. minor version. revision", such as "7.4.10".
- If the version number cannot be obtained, the function returns false.
- This function is available in PHP 4 and above.