Wednesday, September 27, 2017

How to Upgrade to PHP 7 or 7.1 on macOS?

Usually, with a fresh version of macOS Sierra, you get a PHP 5.6 installed.

Download and Install to PHP 7.0 or 7.1
You’ve got two options: brew or curl install. I am showing how to upgrade to PHP version 7.0 or 7.1 using curl method.

Open Terminal and run…
curl -s | bash -s 7.0
or for 7.1
curl -s | bash -s 7.1

If the output of php -v still doesn't echoes the version 7, simply type following command to update your path, it should do the magic, as stated on website
export PATH=/usr/local/php5/bin:$PATH

Source: How to upgrade your version of PHP to 7.0 on macOS Sierra

No comments:

Post a Comment