Install PEAR on macOS 10.15 Catalina

macOS now no longer ships with PEAR, but installation is quite easy.

Prerequisites

  1. Homebrew (install instructions)

Install PEAR

cd /tmp
curl -s -O https://pear.php.net/install-pear-nozlib.phar
sudo php install-pear-nozlib.phar -d /usr/local/lib/php -b /usr/local/bin

Upgrade PEAR