FORMULAv8.6.0
php for macOS
General-purpose scripting language
Installation on macOS (Apple Silicon & Intel)
brew install php
Package Metadata
| Identifier | php |
|---|---|
| Current Version | 8.6.0 |
| Tap Repository | homebrew/core |
| License | PHP-3.01 AND Zend-2.0 AND BSL-1.0 AND MIT AND Apache-1.0 AND Apache-2.0 AND bcrypt-Solar-Designer AND BSD-2-Clause-Darwin AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND ISC AND LGPL-2.1-only AND LGPL-2.1-or-later AND OLDAP-2.8 AND TCL AND Zlib |
| Upstream Homepage | https://www.php.net/ |
| Last Verified | 2026-11-26T14:43:31Z |
Runtime Dependencies (21)
apr apr-util argon2 autoconf curl freetds gd gmp icu4c@79 libpq libsodium libzip net-snmp oniguruma openldap openssl@4 pcre2 sqlite tidy-html5 unixodbc gettext
Build Dependencies (2)
Engineering Caveats
To enable PHP in Apache add the following to httpd.conf and restart Apache:
LoadModule php_module $HOMEBREW_PREFIX/opt/php/lib/httpd/modules/libphp.so
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
Finally, check DirectoryIndex includes index.php
DirectoryIndex index.php index.html
The php.ini and php-fpm.ini file can be found in:
$HOMEBREW_PREFIX/etc/php/8.6/Related macOS Packages
photocraft-cliHeadless PhotoCraft engine to convert, inspect and batch-edit imagesphp-code-snifferCheck coding standards in PHP, JavaScript and CSSphoronix-test-suiteOpen-source automated testing/benchmarking softwarephp-cs-fixerTool to automatically fix PHP coding standards issuesphoonDisplays current or specified phase of the moon via ASCII artphp@8.1General-purpose scripting languagephoneinfogaInformation gathering framework for phone numbersphp@8.2General-purpose scripting language