It’s easier than you think.
First you have to add the dotdeb packages to the /etc/apt/sources.list file
1 2 | deb http://packages.dotdeb.org stable all deb-src http://packages.dotdeb.org stable all |
if you want the php 5.3 branch, add these lines instead
1 2 | deb http://php53.dotdeb.org stable all deb-src http://php53.dotdeb.org stable all |
You have then to install the gpg keys :
1 2 | gpg --keyserver keys.gnupg.net --recv-key 89DF5277 gpg -a --export 89DF5277 | sudo apt-key add - |
(remove “sudo” if you’re already root)
Then do :
1 2 | apt-get update apt-get upgrade |
Here you have, the latest PHP version (5.2.14 or 5.3.3 at this moment)

