How can one check if PHP is properly installed and running on a web server?

To check if PHP is properly installed and running on a web server, you can create a PHP file with a simple script that displays PHP information such as the version number. By accessing this file through a web browser, you can confirm that PHP is working correctly.

<?php
phpinfo();
?>