Installing PHP >8.0 on MacOS 11 (Homebrew)

I’m trying to install PHP version 8.4 (or any version above 8.0) on my MacBook, but each time I run into an error with curl or with MacOS 11.

I know MacOS 11 is outdated but it is the last version I am able to get on this Macbook (mid 2014, intel).

My process:

I started by just trying to install PHP v8.4 like this: brew install [email protected] which gave me the following error:

% brew install [email protected]

Warning: You are using macOS 11.
We (and Apple) do not provide support for this old version.

This is a Tier 3 configuration:
  https://docs.brew.sh/Support-Tiers#tier-3
Do not report any issues to Homebrew/* repositories!
Read the above document instead before opening any issues or PRs.

...............................
.. lots of package downloads ..
...............................

curl: (35) error:1400442E:SSL routines:CONNECT_CR_SRVR_HELLO:tlsv1 alert protocol version
Error: [email protected]: Failed to download resource "libsodium"
Download failed: https://download.libsodium.org/libsodium/releases/libsodium-1.0.20.tar.gz

Which (after looking on internet and asking AI) indicates outdated SSL certificates (don’t know if that is really the problem).

I tried multiple things like:

# Update Homebrew itself
brew update

# Update curl
brew install curl

# Update certificates
brew install ca-certificates

export PATH="/usr/local/bin:$PATH"

But that did not change anything.

Then I tried to use the shivammathur/homebrew-php tap which gave me the same error.

After looking on the internet for a while I found a GitHub discussion that gave me this solution:

export HOMEBREW_FORCE_BREWED_CURL=1
brew config   # check that the Curl: entry now points to Homebrew curl
brew install pure-ftpd

This seemed to work when I tried to install PHP again because running: brew install shivammathur/php/[email protected] again it installed packages it could not before.

But after almost an hour of downloading it gave me this error:

==> python3.13 -m venv --system-site-packages --without-pip /usr/local/Cellar/asciidoc/10.2.1/libexec
==> python3.13 -m pip --python=/usr/local/Cellar/asciidoc/10.2.1/libexec/bin/python install /private/tmp/asciidoc-20250616-5971-avx3y
Last 15 lines from /Users/stagair/Library/Logs/Homebrew/asciidoc/02.python3.13:
2025-06-16 09:05:44 +0000

python3.13
-m
pip
--python=/usr/local/Cellar/asciidoc/10.2.1/libexec/bin/python
install
--verbose
--no-deps
--no-binary=:all:
--ignore-installed
--no-compile
/private/tmp/asciidoc-20250616-5971-avx3y6/asciidoc-10.2.1

/usr/local/opt/[email protected]/bin/python3.13: No module named pip.__main__; 'pip' is a package and cannot be directly executed



Error: You are using macOS 11.
We (and Apple) do not provide support for this old version.

This is a Tier 3 configuration:
  https://docs.brew.sh/Support-Tiers#tier-3
Do not report any issues to Homebrew/* repositories!
Read the above document instead before opening any issues or PRs.

This build failure was expected, as this is not a Tier 1 configuration:
  https://docs.brew.sh/Support-Tiers
Do not report any issues to Homebrew/* repositories!
Read the above document instead before opening any issues or PRs.

Is it at all possible to install PHP 8 on my MacBook?