Upgrading to PHP 7.1 on MacOS using Brew

So today, I finally decided to upgrade my laptop to the latest PHP version as of this writing, which is 7.1.4. Now, some people were wondering why they skipped version 6. ¬†When I went to the PHP Conference Asia 2015 in Singapore, Rasmus Lerdorf himself told us in his keynote speech that they intentionally skipped version 6 because they don’t want to have PHP 6.6.6. It’s more of a superstition rather than a business/technical decision.

Now going back, here is a simple way of upgrading your PHP version to the latest 7.1.4.

1. Update/Upgrade Brew


brew update
brew upgrade

2. Install PHP 7.1


brew install php71

3. Check


ridvan-work:oneweb-ofb ridvanbaluyos$ php -v
PHP 7.1.4 (cli) (built: Apr 14 2017 15:02:16) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies

 

And there you have it, aside from performance updates, you get to enjoy these new features in this latest version of PHP. A case study for this would be how OLX migrated to 7.1 and how we were able to reap the benefits.

Happy coding!

Leave a Reply

Your email address will not be published. Required fields are marked *