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 OSX 10.15.4 running xcode-select --install fixed the issue for me.
xcode-select --install