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(); ?> |