Install PHP 5.6 on Debian Wheezy

To install PHP 5.6 on Wheezy, you can add this repo:

echo "deb wheezy-php56 all" >> /etc/apt/sources.list.d/dotdeb.list
echo "deb-src wheezy-php56 all" >> /etc/apt/sources.list.d/dotdeb.list

Add the key:

sudo apt-key add dotdeb.gpg

And install PHP:

apt-get update
apt-get install libapache2-mod-php5 php-pear php5 php5-cli php5-common php5-curl php5-gd php5-mcrypt php5-mysql php5-sqlite (or whatever package you might need)