I am PHP programmer that know Rails.
Ruby gem bundler very good tool to install dependencies, does php have something like that?(maybe some php framework have such tool)
There is Composer.
Composer is a package manager tracking local dependencies of your projects and libraries.
Then you have Packagist (which is the main Composer repository).
Packagist is the main Composer repository. It aggregates all sorts of PHP packages that are installable with Composer.
And you can also manage your private/own repository using Satis.
Simple static Composer repository generator.
By the way, a post from the author about What & Why Composer.
there is pecl for php, for php extensions.