Adam Harvey has a (very) quick post with a hint for PEAR users out there - how to get a list of installaed packages on the system you're using.
I’ve seen three people ask a variation of how can I get a list of installed PEAR packages from within my PHP script in the last few weeks on IRC, and two just in the last day. Because I’m a helpful sort, here’s a little morsel of code that will do just that.
The code loads the PEAR Registry package and loops, via a foreach, through the results from a listPackages() call. It should work with just about any PEAR version.