Use a third-party bundle that installs PHP along with a web server and database, for example XAMPP.Windows users have a several of options for installing PHP: Alternatively, you can compile PHP from source following the instructions on php.net. PHP is typically available through your distribution's package manager, such as yum for RedHat/CentOS based Linux distributions or apt-get for Debian/Ubuntu. Type brew install php in your terminal.If you have not used Homebrew before, download it following the instructions on its homepage.If you are not happy with the version of PHP that comes with your Mac you can install PHP through Homebrew: PHP is available on every Mac by default. If this message indicates an older version or you do not get any PHP version at all and something like php: command not found instead you need to install or upgrade PHP. Zend Engine v3.1.0, Copyright ( c ) 1998 -2018 Zend Technologies