Good news! PHP 8.2 is being actively supported through 31 Dec 2024. After that point, it's advisable to upgrade to the latest version, since the PHP team will only offer security-related support until 31 Dec 2026, at which point PHP 8.2 will be considered "end-of-life".
brew update
brew install [email protected]
brew link [email protected]
echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
php -v
You should see output indicating PHP 8.2.x
php -i
This will display detailed PHP configuration information
echo '<?php phpinfo();' > test.php
php test.php
This should output PHP configuration information in your terminal