# A Note on PEAR

> Section in “Introduction › Getting PHP 7” of the book [PHP 7 Explained](https://php7explained.com/) by Sebastian Bergmann and Stefan Priebsch, published by thePHP.cc. The book covers PHP 7.0 to 7.4 and was last updated in November 2020. HTML version: <https://php7explained.com/introduction/getting-php-7/a-note-on-pear/>

PEAR, the PHP Extension and Application Repository, was historically used to distribute reusable components. PEAR has been superseded by Composer and is not widely used any more.

In the aftermath of the [pear.php.net security incident](https://thephp.cc/news/2019/02/blast-from-the-past) in early 2019, the PHP development team decided that the PEAR Installer would no longer be installed by default when you build PHP yourself from its sources.

If you build PHP yourself from its sources and still need the PEAR Installer then you need to pass the `--with-pear` flag to the `configure` script. Without the `--with-pear` flag, no PEAR environment will be created.

---

Previous: [Microsoft Windows](https://php7explained.com/introduction/getting-php-7/microsoft-windows/index.html.md) | Next: [Backward Incompatible Changes](https://php7explained.com/backward-incompatible-changes/index.html.md)
