The following instructions installPEARandPECLon Mac OS X under/usr/local/. PECL is bundled with PEAR. So this is as simple as installing PEAR on Mac OS X.
PEAR is PHP’sPackageRepository and makes it easy to download and install PHP tools likePHPUnitandXDebug. I specifically recommend these two for every PHP developer.
Download PEAR
curl -O http://pear.php.net/go-pear.phar
sudo php -d detect_unicode=0 go-pear.phar
Configure and Install PEAR
You should now be at a prompt to configure PEAR.
Type1and pressreturn.
Enter:
/usr/local/pear
Type4and pressreturn.
Enter:
/usr/local/bin
Pressreturn
Verify PEAR
You should be able to type:
pear version