To do that follow this step:
vim phpinfo.php
And paste inside that file of these contents below:
<?
php phpinfo();
?>
Then, go to http://your-server/path/phpinfo.php
Extra Knowledge on php.ini
Whether you’re a PHP beginner or a seasoned developer, I’m sure that you’ve heard of php.ini: the most important PHP configuration file.
When PHP is run, it looks for the php.ini file in some specific locations and loads it. This file allows you to configure a few important settings that you should be aware of. Quite often, you’ll find you need to tweak settings in the php.ini file.
On the other hand, it’s certainly possible that you’ve never needed to modify php.ini. PHP can run happily with the settings provided in the default php.ini file, since PHP ships with these default recommended settings. In fact, there are no critical configuration parameters that you must set in order to run PHP.
However, the php.ini file provides a couple of important settings that you want to make yourself familiar with. In fact, as a PHP developer, it’s inevitable, and you’ll encounter it sooner rather than later.