Mac升级自带PHP版本(非Homebrew方式)

一、升级到对应版本

升级到PHP 7.3

curl -s https://php-osx.liip.ch/install.sh | bash -s 7.3

升级到PHP 7.2

curl -s https://php-osx.liip.ch/install.sh | bash -s 7.2

二、添加环境变量

我安装的是7.3.8版本的

export PATH=/usr/local/php5-7.3.8-20190811-205217/bin:$PATH

三、查看PHP版本

php --version
PHP 7.3.8 (cli) (built: Aug 11 2019 20:50:16) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.8, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.8, Copyright (c) 1999-2018, by Zend Technologies
    with Xdebug v2.7.2, Copyright (c) 2002-2019, by Derick Rethans

猜你喜欢

转载自blog.csdn.net/wuxing26jiayou/article/details/106214368
今日推荐