What is the purpose of using phpinfo() to check if PHP is installed?

Using phpinfo() allows you to quickly check if PHP is installed on a server and view the current PHP configuration settings. This can be useful when troubleshooting PHP-related issues or verifying that PHP is properly set up on a server.

<?php
phpinfo();
?>