JL521
JL521

Reputation: 41

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?

Upvotes: 3

Views: 447

Answers (1)

JL521
JL521

Reputation: 41

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.

Upvotes: 1

Related Questions