A little bit of PHP Monitor: "PHP Monitor (or phpmon) is a lightweight macOS utility app that runs on your Mac and displays the active PHP version in your status bar. It's tightly integrated with Laravel Valet, so you need to have it set up before you can use this."
PHP Monitor Installation
To install PHP Monitor you can make use of Homebrew and below are the 2 commands that you need to run on your terminal.
brew tap nicoverbruggen/homebrew-cask brew install --cask phpmon
How to Switch PHP Version?
To switch to the PHP version you can simply open the PHP Monitor menu and then press the respective PHP version. In the case of the screenshot below, we have versions 7.4, 8.0, and 8.1. Otherwise, you can change it using Command + 1 or Command + 2 or Command + 3 but make sure the menu is opened.
How to Restart or Stop PHP Services?
To restart or stop the PHP services it's available under the "manage services" and just like switching PHP versions, you can make use of the shortcuts Command + D, Command + P, Command N, or top stop all services Shift + Command + S.
How to Edit PHP Config?
Lastly, to edit the PHP Configuration you can locate the config files and then use your preferred text editor and then save it. Do make sure to restart the PHP service so that it's applied.
By now you should be able to configure, switch and easily manage your PHP on your macOS easily. If this snippet is useful do make sure to share it with your friends and cheers, happy trying!