What are the best practices for testing if PEAR is functioning correctly after installation?

After installing PEAR, it is essential to test if it is functioning correctly to ensure that it can be used for package management in PHP applications. One way to test this is by running a simple script that includes a PEAR package and checking for any errors or warnings that may arise.

<?php
require 'System.php'; // Include a PEAR package

if (class_exists('System')) {
    echo 'PEAR is functioning correctly.';
} else {
    echo 'PEAR is not functioning correctly. Please check your installation.';
}
?>