Two lines. That’s all it takes.
Ubuntu x64:
sudo su
cd /tmp && mkdir php53 && cd php53 && wget http://php53.dotdeb.org/dotdeb_all.deb && wget http://php53.dotdeb.org/dotdeb.2004.02.25.key && apt-key add dotdeb.2004.02.25.key && dpkg -i dotdeb_all.deb && aptitude update && aptitude install php5
Ubuntu 32-bit (i386):
Same command. The dotdeb repository handles both architectures.