"."/> ".">
Home > Article > Backend Development > How to check php version
How to check the php version?
The following are two methods to help you check your php version.
Use the phpinfo() function, which is used to display the configuration information of the PHP server. Create a PHP file in your environment, put the code below the data, and then execute it and the following results will be printed. You can You can clearly see that your current php version has configuration information such as php, apache, mysql, etc.
<?php Phpinfo(); ?>
Use the phpsersion() function. The prototype of this function is string phpversion(void); a string is returned. This function returns the php version information, creates a php file, enter the following code, and you can browse You can see the version information of PHP returned in the browser.
<?php echo phpversion(); ?>
For more PHP related knowledge, please visit PHP Chinese website!
The above is the detailed content of How to check php version. For more information, please follow other related articles on the PHP Chinese website!