Mac OS 安装php7.4

安装homebrew方法(若已经安装,忽略)

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

通过 brew 安装

brew install [email protected]

刷新php连接

brew link [email protected]

查看php版本

php -v

查看PHP的服务

brew services list
# 两个PHP版本
[email protected] stopped       
[email protected] started jason /Users/jason/Library/LaunchAgents/[email protected]

停止老的PHP版本,启用新的php版本

# 停止老版本
brew services stop [email protected]
# 启动新的版本
brew services start [email protected]

你可能感兴趣的:(Mac OS 安装php7.4)