Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP won't update

When I run php -v, I get the following:

WARNING: PHP is not recommended
PHP is included in macOS for compatibility with legacy software.
Future versions of macOS will not include PHP.
PHP 7.3.24-(to be removed in future macOS) (cli) (built: May  8 2021 09:40:37) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.24, Copyright (c) 1998-2018 Zend Technologies

When I run brew upgrade php I get Warning: php 8.1.1 already installed. How can I switch to from 7.3.24 to 8.1.1?

like image 624
JL521 Avatar asked Sep 01 '26 22:09

JL521


1 Answers

I ran echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.bash_profile then source ~/.bash_profile, and I am now getting the latest version.

like image 123
JL521 Avatar answered Sep 03 '26 12:09

JL521



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!