If you take a look at the PHP supported versions, PHP8.0 is not currently supported.
If you try to install with brew
, you are going to get an error:
$ brew install php@8.0 Error: php@8.0 has been disabled because it is a versioned formula!
At the official website, you can see it disabled.
If you need to use this version, or a previous one, between 5.6 and the last supported, you can use a different tap. To do this, you need to add the tap:
brew tap shivammathur/php
Then you have to install the desired version:
brew install shivammathur/php/php@8.0
And now you have this unsupported version installed on your macOS:
php -v PHP 8.0.30 (cli) (built: Aug 3 2023 17:13:08) ( NTS )
More info: