Home > Backend Development > PHP Tutorial > How to check php version information

How to check php version information

WBOY
Release: 2016-07-25 08:46:53
Original
1399 people have browsed it
Php version control has always been a difficult problem. Because of different versions, many functions cannot be implemented well. Therefore, when the program is uploaded to the space, the version must be effectively controlled to avoid unnecessary troubles. . So how to check your current php version? Here 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 clearly see that you The current version of php, including php, apache, mysql and other configuration information.
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. Create a php file. Enter the following code and you can see the returned php in the browser. version information.
echo phpversion();
​?>


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template