Mac安装PHP7.1

首先已经安装了brew。

$ brew update
$ brew tap homebrew/dupes
$ brew tap homebrew/php
$ brew update
$ brew install php71 --with-httpd24        // 安装带模块

重新打开命令行:

$ php -v

PHP 7.1.10 (cli) (built: Oct 17 2017 13:23:24) ( ZTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies

The end.

你可能感兴趣的:(Mac安装PHP7.1)