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-2018 Zend Technologies
with Zend OPcache v7.2.9, Copyright (c) 1999-2018, by Zend Technologies
user:~ sl$