# 1. Open the Terminal (usually found in Applications -> Utilities)
# 2. Uninstall PHP using Homebrew:
brew uninstall php
# Note: The above command will remove all versions of PHP installed via Homebrew.
# Alternatively, if you want to remove a specific PHP version, you can specify the version like this:
brew uninstall php@7.4
# 3. (Optional) Remove any remaining PHP configuration files:
sudo rm -rf /etc/php.ini
sudo rm -rf /etc/php.d/
# These commands will delete the main PHP configuration file and the PHP extension configuration folder respectively.