What is phpinfo() ? | phpinfo()
phpinfo() function provides large amount of information regarding the current state of PHP. This function gives information regarding version of PHP, PHP environment, OS version, compilation and extensions options, local values of configuration options, PHP licence, apache environment, HTTP Header information, additional modules.
As setup and configuration of every system is different so phpinfo() function is mostly used to check the settings of configuration and system’s predefined variables.
phpinfo() function contains data of “EGPCS : Environment, GET, POST, Cookie and Server” so it can also be used as a debugging tool.
To make phpinfo.php, follow these sample steps :
- In any text editor or notepad, enter the following code snippet :
- Now save this file as “phpinfo.php”.
- Run this file in your browser and you will get below output.