I installed node using homebrew (Mojave), afterwards php stoped working and if I try to run php -v I get this error:
php -v
php -v dyld: Library not lo
i followed this article here and this seems to be the missing piece of the puzzle for me:
brew uninstall node@8