sudo add-apt-repository ppa:ondrej/php

apt-get install php5.6
apt-get install php5.6-igbinary php5.6-mbstring php5.6-mcrypt php5.6-soap php5.6-redis php5.6-intl php5.6-mcrypt php5.6-mysqli php5.6-xml
apt-get install php5.6-fpm
apt-get install php5.6-cgi
sudo update-alternatives --config php
 
 
/usr/local/psa/bin/php_handler --add -displayname fpm-56 -path /usr/bin/php-cgi5.6 -phpini /etc/php/5.6/fpm/php.ini  -type fpm -clipath /usr/bin/php5.6 -poold /etc/php/5.6/fpm/pool.d     -service php5.6-fpm