Migrating your Development Environment from PHP 5+ to PHP 7 | Code it | Scoop.it

Many PHP applications are still running on PHP 5.x, not ready to take full advantage of the awesome features that PHP 7 offers.

 

A lot of developers have not made the switch because of certain fears of compatibility issues, migration challenges and the strange awkward feeling that migrating will take away a big chunk of their time.

 

In this tutorial, you'll learn how to upgrade your PHP 5 application to PHP 7 starting from upgrading your development environment.

 

Mac OS X

If you are a fan of Homebrew, you can install PHP 7.0 via homebrew like so:

brew tap homebrew/dupes brew tap homebrew/versions brew tap homebrew/homebrew-php brew unlink php56 brew install php70

If you were using PHP 5.6, then you should unlink the old PHP by running brew unlink php56 else unlink whatever version is present before you go ahead to install PHP 7.0.

Another option is to install it via curl on your terminal like so:

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

Windows

If you are fan of WAMP or XAMPP, then you can just download the latest versions of the software. It comes packaged with PHP 7.0.

Download and install the last/latest version

Another option is to download the PHP 7.0 distribution for windows from http://windows.php.net/download#php-7.0.

Ubuntu

If you are running Ubuntu on your machine, especially around v14 and 15, you can install PHP 7.0 by running these commands:

sudo apt-get update sudo add-apt-repository ppa:ondrej/php sudo apt-get install -y php7.0-fpm php7.0-cli php7.0-curl php7.0-gd php7.0-intl php7.0-mysql

Note: You can check out how to install PHP 7 and Nginx here, and manually build memcached module for PHP 7.

 

 

read the steps for the other OS's as well as other details in the original article at https://auth0.com/blog/migrating-a-php5-app-to-php7-part-one/