What are the key system and web server requirements for a successful PHP installation?

To ensure a successful PHP installation, it is important to meet the key system and web server requirements. This includes having a compatible operating system (such as Windows, Linux, or macOS), a supported web server (such as Apache or Nginx), and the necessary software dependencies (such as MySQL or SQLite).

// Example PHP code snippet for checking system requirements
<?php
echo 'System Requirements Check:<br>';
echo 'Operating System: ' . PHP_OS . '<br>';
echo 'Web Server: ' . $_SERVER['SERVER_SOFTWARE'] . '<br>';
echo 'PHP Version: ' . phpversion() . '<br>';
?>