What role does the phpinfo() function play in troubleshooting PHP-related issues?
The phpinfo() function is used to display detailed information about the PHP configuration on a server, including PHP version, extensions, and server information. This can be helpful in troubleshooting PHP-related issues by providing insight into the current PHP setup.
<?php
phpinfo();
?>