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
On MacOS Mojave, only way I could fix it was with brew upgrade
brew upgrade