How can I install php7.1 using brew in 2020

Up until the end of March 2018, all PHP related brews were handled by Homebrew/php tab, but that has been deprecated, so now we use what's available in the Homebrew/core package. This should be a better maintained, but is a much less complete, set of packages.

PHP 5.6, PHP 7.0, and PHP 7.1 have been deprecated and removed from Brew because they are out of support, and while it's not recommended for production, there are legitimate reasons to test these unsupported versions in a development environment.

Remember only PHP 7.2 through 7.4 are officially supported by Brew so if you want to install PHP 5.6, PHP 7.0, or PHP 7.1 you will need to add this tap:

$ brew tap shivammathur/php

Reference here


[email protected] is deprecated https://www.php.net/supported-versions.php.

So try to install with other repo

brew install openldap libiconv
brew tap exolnet/homebrew-deprecated
brew install [email protected]

https://devhoi.com/threads/install-brew-deprecated-php-version-php-7-1-5-6-7-0-on-brew-macos.25/

Tags:

Php

Homebrew