🍺 BREW Explorer

← all formulae

php@8.4

brew install php@8.4 v8.4.22 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 keg-only

PHP 8.4 interpreter and runtime for server-side scripting and command-line execution.

Why you might care

PHP 8.4 is the latest stable version with performance improvements, JIT compilation, and modern language features. Install this specific version alongside system PHP or other PHP versions thanks to keg-only versioning. Essential for running PHP applications, web frameworks (Laravel, Symfony), and CLI tools.

Categories

Alternatives

Python Node.js Ruby
3.0k
30-day installs · #795
8.9k
90-day · #858
22.7k
365-day · #1005

Runtime dependencies

Build dependencies

Links

Caveats

To enable PHP in Apache add the following to httpd.conf and restart Apache:
    LoadModule php_module $HOMEBREW_PREFIX/opt/php@8.4/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.4/

Keg-only reason

:versioned_formula

Blurb generated by claude-haiku-4-5 on today.

Raw metadata
{
  "aliases": [],
  "alternatives": [
    "Python",
    "Node.js",
    "Ruby"
  ],
  "build_dependencies": [
    "httpd",
    "pkgconf"
  ],
  "categories": [
    "language-runtime",
    "interpreter"
  ],
  "caveats": "To enable PHP in Apache add the following to httpd.conf and restart Apache:\n    LoadModule php_module $HOMEBREW_PREFIX/opt/php@8.4/lib/httpd/modules/libphp.so\n\n    \u003cFilesMatch \\.php$\u003e\n        SetHandler application/x-httpd-php\n    \u003c/FilesMatch\u003e\n\nFinally, check DirectoryIndex includes index.php\n    DirectoryIndex index.php index.html\n\nThe php.ini and php-fpm.ini file can be found in:\n    $HOMEBREW_PREFIX/etc/php/8.4/\n",
  "conflicts_with": [],
  "dependencies": [
    "apr",
    "apr-util",
    "argon2",
    "autoconf",
    "curl",
    "freetds",
    "gd",
    "gmp",
    "icu4c@78",
    "libpq",
    "libsodium",
    "libzip",
    "net-snmp",
    "oniguruma",
    "openldap",
    "openssl@3",
    "pcre2",
    "sqlite",
    "tidy-html5",
    "unixodbc",
    "gettext"
  ],
  "deprecated": 0,
  "deprecation_reason": null,
  "desc": "General-purpose scripting language",
  "disable_reason": null,
  "disabled": 0,
  "enrichment_fetched_at": "2026-06-20T23:41:06+00:00",
  "first_seen": "2026-06-20T23:34:18+00:00",
  "full_name": "php@8.4",
  "github_default_branch": null,
  "github_last_commit_at": null,
  "github_readme_excerpt": null,
  "github_repo": null,
  "github_stars": null,
  "github_topics": [],
  "homepage": "https://www.php.net/",
  "homepage_og_description": "PHP is a popular general-purpose scripting language that powers everything from your blog to the most popular websites in the world.",
  "homepage_og_image": "https://www.php.net/images/meta-image.png",
  "homepage_title": "PHP",
  "installs_30d": 3043,
  "installs_365d": 22696,
  "installs_90d": 8899,
  "keg_only": 1,
  "keg_only_reason": ":versioned_formula",
  "last_seen": "2026-06-20T23:34:18+00:00",
  "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",
  "llm_generated_at": "2026-06-20T23:47:05+00:00",
  "llm_model": "claude-haiku-4-5",
  "name": "php@8.4",
  "oldnames": [],
  "one_liner": "PHP 8.4 interpreter and runtime for server-side scripting and command-line execution.",
  "optional_dependencies": [],
  "rank_30d": 795,
  "rank_365d": 1005,
  "rank_90d": 858,
  "raw_hash": "349a522e7f9827f7",
  "recommended_dependencies": [],
  "revision": 0,
  "ruby_source_path": "Formula/p/php@8.4.rb",
  "tap": "homebrew/core",
  "test_dependencies": [
    "httpd"
  ],
  "uses_from_macos": [
    {
      "xz": "build"
    },
    "bzip2",
    "libedit",
    "libffi",
    "libxml2",
    "libxslt"
  ],
  "version_head": null,
  "version_stable": "8.4.22",
  "versioned_formulae": [
    "php@8.3",
    "php@8.2",
    "php@8.1"
  ],
  "why_use_this": "PHP 8.4 is the latest stable version with performance improvements, JIT compilation, and modern language features. Install this specific version alongside system PHP or other PHP versions thanks to keg-only versioning. Essential for running PHP applications, web frameworks (Laravel, Symfony), and CLI tools."
}