What are the advantages of using Composer over PEAR for managing PHP dependencies, and how does it simplify the installation process?

Composer is a more modern and widely used tool for managing PHP dependencies compared to PEAR. It simplifies the installation process by allowing developers to easily specify the required libraries and versions in a composer.json file. Composer also automatically resolves and installs dependencies, making it easier to manage and update packages.

// Example composer.json file
{
    "require": {
        "monolog/monolog": "^1.0"
    }
}