c9s/phpbrew — pull request #136 by chadrien (2013-12-03 13:44:37+00:00)
Title: Infinite loop when running phpbrew ext install xxx

I installed phpbrew globaly, and the bin is at /usr/local/bin/phpbrew.
When I run `phpbrew ext install any-ext-here`, nothing happens and
terminal complains about recursive level exceeded.

That's because when bin/phpbrew does not exist, BIN take phpbrew as
value. But as phpbrew is also the function name when `$BIN ${*:1}` (phpbrew.sh L141) is run, it runs the phpbrew function, not the binary, leading to the infinite loop.

To counter this, BIN should equal to `which -p phpbrew` which will look
for the binary file path specificaly, excluding the function.