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
Just brew remove php and brew install php did not work, nor did brew reinstall php. My solution was to do:
brew remove php
brew install php
brew reinstall php
brew remove php cd /usr/local/Cellar rm -rf php/ brew install php brew doctor brew cleanup
Now php -v gives me:
PHP 7.3.2 (cli) (built: Feb 14 2019 10:08:45) ( NTS )