How to get information about your php installation

How to get information about your php installation

When creating php programs, not only is it important to know which version of php is running on your server but also which modules are compiled with your php installation.

To check what modules are installed, simply type the following code in a php file and load the file in your browser.

phpinfo(8);

If you would like to just view the general php information such as the configuration, php.ini location, build date, and web server then you can use the following code.

phpinfo(1);

If you would like to view all of the information available about your php installation then just use the following code.

phpinfo();

This is a very quick and easy way to check and make sure that your php configuration is going to be compatible with the program you are planning to write.