The Phpinfo() function s used for checking the current PHP configuration. It can also be used for the purpose of debugging because it comprises of all EGPCS (Environment, GET, POST, Cookie, Server) data.
In order to run the function, follow the steps mentioned below:
Login to your cPanel account, go to Files > File manager menu
Go to ‘public_html’ directory, click on ‘New File’ and create ‘phpinfo.php’ file
Locate the newly created file in the list and click on ‘Code Editor’
Add the lines of the code mentioned below to the file and click on Save changes
<?php
phpinfo();
?>
In order to check detailed information about PHP configuration of your account, just open the following link in your browser:
http://yourdomain(dot)com/phpinfo(dot)php
Replace yourdomain.com with your domain name.
Related: How can I change my PHP Version in cPanel
Note : Please don’t forget to delete the file once you are done with checking all the necessary information for security reasons.