News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Adam Harvey's Blog:
$pear->list
October 13, 2007 @ 14:26:00

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.

0 comments voice your opinion now!
pear list package example listpackages registry pear list package example listpackages registry


blog comments powered by Disqus

Similar Posts

Padraic Brady's Blog: The PHPSpec Zend Framework App Testing Manifesto: ZF Integration

Zend Developer Zone: Want to meet up with a Zender at a future conference?

Kevin Schroeder's Blog: Deployment beta for Zend Server 5.5 - Getting Started

Pierre-Alain Joye's Blog: Zip-1.7.5 works even with broken path

SitePoint Web Tech Blog: How To Create Friendlier Random Passwords


Community Events





Don't see your event here?
Let us know!


library version mvc release tool interview series framework security update community language symfony opinion voicesoftheelephpant package introduction composer laravel podcast

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework