Homebrew is a package manager for macOS. To install it, open the Terminal and run the following command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Once Homebrew is installed, you can install PHP by running:
brew install php
For more details, visit the official PHP installation guide for macOS: PHP Manual.
The easiest way to set up PHP on Windows is by using Laragon. Follow these steps:
- Download Laragon from Laragon's Website.
- Install Laragon and follow the on-screen instructions.
Once Laragon is installed, PHP is ready to use. You can check the PHP version by opening the Laragon Terminal and running:
php -v
Visit the Laragon Documentation for more information.
Happy coding!