PHPinfo is a useful function of PHP for returning compiled information about the PHP environment on your server. This includes information about PHP compilation options and extensions, the PHP version, server information and environment, the PHP environment, OS version information, paths, master and local values of configuration options, HTTP headers and the PHP license. Because every system is setup differently, phpinfo is commonly used to check configuration settings for available predefined variables on a given system. Also, phpinfo is a valuable debugging tool as it contains all EGPCS (Environment, GET, POST, Cookie, Server) data.
You will get the PHP informations not only from the browser but also from the server command-line
Method I : Get PHP info on browser
In this method, you need to create a file with ‘.php’ extension under the public folder of your website and add the following code.
<? php phpinfo(); ?>
And then access the file from your web-browser.
Method II : Get PHP information on command-line
Yes! there is an option to list PHP info on the command-line. Execute the following command to get the information.
php -r 'phpinfo();'