Mac brew 升级 php7.2 并设置为默认

mac 升级PHP 到 7.2

whereis PHP 
PHP -v

 

系统自带的是 PHP5.6,需要升级到最新版本 PHP7.2

 

brew install PHP72
brew info PHP72
brew --prefix PHP

 


中途可能要升级 xcode-select

修改 ~/.bash_profile

user:~ sl$ cat ~/.bash_profile 

# The original version is saved in .bash_profile.pysave
PATH="$(brew --prefix PHP)/bin:$PATH"
export PYTHON_ENV=development

user:~ sl$ source ~/.bash_profile 
user:~ sl$ PHP -v
user:~ sl$ PHP -v
PHP 7.2.9 (cli) (built: Aug 23 2018 02:10:05) ( NTS )
copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0,copyright (c) 1998- Zend Technologies
    with Zend OPcache v7.2.9,1)">1999-,by Zend Technologies
user:~ sl$ 

————————————————
版权声明:本文为CSDN博主「用户昵称不能为空」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/default7/article/details/82287741

相关文章

统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
前言 之前做了微信登录,所以总结一下微信授权登录并获取用户...
FastAdmin是我第一个接触的后台管理系统框架。FastAdmin是一...
之前公司需要一个内部的通讯软件,就叫我做一个。通讯软件嘛...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...