Using any php application results in:
dyld: Library not loaded: /usr/local/lib/libpng15.15.dylib
Referenced from: /usr/local/bin/php
Reason: image not found
It's because there's no symlinks for libpng. You need to link libpng again.
brew unlink libpng && brew link libpng
And you may get some error. I fixed that error by correcting permission. Maybe it's because of uninstalled macports.
sudo chown -R yourid:staff /usr/local/share/man/
Create link again and it'll work.