What are some best practices for verifying PHP installation and configuration on a web server?

Verifying PHP installation and configuration on a web server is crucial to ensure that PHP scripts will run correctly. One common way to verify PHP installation is by creating a PHP info file that displays information about the PHP configuration on the server.

<?php
// Create a PHP info file to verify PHP installation
phpinfo();
?>