Reverend Jim asks why you’re not using PEAR for PHP. He suggested:
lynx -source http://go-pear.org | php
Alas, I need to upgrade my install of PHP before I can play with this. It looks like PEAR is a long way from CPAN as far as maturity and ease of use goes, but heck, it’s a start.