PHP Velho Oeste 2024

Using Packages

There are a few pre-packaged and pre-compiled versions of PHP for macOS. This can help in setting up a standard configuration, but if you need to have a different set of features (such as a secure server, or a different database driver), you may need to build PHP and/or your web server yourself. If you are unfamiliar with building and compiling your own software, it's worth checking whether somebody has already built a packaged version of PHP with the features you need.

The quickest way to install php on macOS is with homebrew:

  1. install homebrew, by following the instructions at » brew.sh

  2. brew install php

The following alternative resources also offer easy to install packages and precompiled binaries for PHP on Mac OS:

add a note add a note

User Contributed Notes 3 notes

up
1
Sajt
2 years ago
You can use Laravel valet, what is included PHP, Nginx, DNSMasq and a lot of things for easy developing. (https://laravel.com/docs/8.x/valet)
up
0
saintalifrh at disroot dot org
2 years ago
Valet requires macOS and Homebrew. Before installation, you should make sure that no other programs such as Apache or Nginx are binding to your local machine's port 80.

you need to install brew anyway
up
0
marc_cole
2 years ago
Granted, this is not a "package", but I prefer to use phpbrew, as it allows me to install as many versions of PHP as I want for testing or whatever.

https://github.com/phpbrew/phpbrew
To Top