What are the advantages and disadvantages of using the PHP versions included in Linux distributions like Suse Linux 9.2 versus installing PHP separately?

When using the PHP versions included in Linux distributions like Suse Linux 9.2, the advantage is that it is already integrated with the system and may receive updates along with the distribution. However, the disadvantage is that these versions may not always be the latest, leading to potential security vulnerabilities or missing features. Installing PHP separately allows for more control over the version and configuration, but requires manual updates and maintenance.

// Example PHP code snippet to check the PHP version
if (version_compare(PHP_VERSION, '7.4.0') < 0) {
    echo 'This script requires PHP 7.4.0 or higher';
    exit;
}