🍺 BREW Explorer

← all formulae

php@8.2

brew install php@8.2 v8.2.31 PHP-3.01 AND Zend-2.0 AND BSL-1.0 AND MIT AND Apache-1.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.2 interpreter and runtime for web applications and command-line scripts (keg-only versioned formula).

Why you might care

Install PHP 8.2 alongside other PHP versions without conflicts; useful for projects targeting this specific minor version or testing compatibility. Keg-only means it won't shadow system PHP. Includes standard extensions (curl, gd, pgsql, sqlite, etc.) for typical web-dev workflows.

Categories

Alternatives

php python node.js ruby
1.8k
30-day installs · #1018
6.0k
90-day · #1009
34.2k
365-day · #829

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.2/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.2/

Keg-only reason

:versioned_formula

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

Raw metadata
{
  "aliases": [],
  "alternatives": [
    "php",
    "python",
    "node.js",
    "ruby"
  ],
  "build_dependencies": [
    "httpd",
    "pkgconf"
  ],
  "categories": [
    "interpreter",
    "language-runtime"
  ],
  "caveats": "To enable PHP in Apache add the following to httpd.conf and restart Apache:\n    LoadModule php_module $HOMEBREW_PREFIX/opt/php@8.2/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.2/\n",
  "conflicts_with": [],
  "dependencies": [
    "apr",
    "apr-util",
    "argon2",
    "aspell",
    "autoconf",
    "curl",
    "freetds",
    "gd",
    "gmp",
    "icu4c@78",
    "krb5",
    "libpq",
    "libsodium",
    "libzip",
    "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:16+00:00",
  "first_seen": "2026-06-20T23:34:18+00:00",
  "full_name": "php@8.2",
  "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": 1830,
  "installs_365d": 34197,
  "installs_90d": 6044,
  "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 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:48:28+00:00",
  "llm_model": "claude-haiku-4-5",
  "name": "php@8.2",
  "oldnames": [],
  "one_liner": "PHP 8.2 interpreter and runtime for web applications and command-line scripts (keg-only versioned formula).",
  "optional_dependencies": [],
  "rank_30d": 1018,
  "rank_365d": 829,
  "rank_90d": 1009,
  "raw_hash": "181b35b950c6ca13",
  "recommended_dependencies": [],
  "revision": 0,
  "ruby_source_path": "Formula/p/php@8.2.rb",
  "tap": "homebrew/core",
  "test_dependencies": [
    "httpd"
  ],
  "uses_from_macos": [
    {
      "xz": "build"
    },
    "bzip2",
    "libedit",
    "libffi",
    "libxml2",
    "libxslt"
  ],
  "version_head": null,
  "version_stable": "8.2.31",
  "versioned_formulae": [
    "php@8.4",
    "php@8.3",
    "php@8.1"
  ],
  "why_use_this": "Install PHP 8.2 alongside other PHP versions without conflicts; useful for projects targeting this specific minor version or testing compatibility. Keg-only means it won\u0027t shadow system PHP. Includes standard extensions (curl, gd, pgsql, sqlite, etc.) for typical web-dev workflows."
}