This function is used to know about configuration details of PHP installed in our machine. Such detailed information returned by this phpinfo() includes platform information, PHP and server environment, HTTP header information, PHP core details like version and directives status, License information and etc.
phpinfo() function has an optional argument. If this function is called with no argument, then will display all information. We can check it by executing the following code.
<?php phpinfo(); ?>
We can also request specific details to be displayed to the browser by passing available constants to this function. Following list shows such available options.
Note: php_info() and php_info(INFO_ALL) both provide same effect on browser.
This function is used to check if required support is available with the server or not. For example, in PHP, we can work with the image, if there is GD support.
If we cannot use the image related functions in a PHP script we can check for the availability of GD support using phpinfo() by,
This PHP code tutorial was published on May 15, 2013.