Vid Luther has come up with this guide for getting the latest PHP release - version 5.3 - installed and working on an Ubuntu (Jaunty) linux installation.
[The goal is to] build a PHP 5.3 package, that I can install and upgrade on new ubuntu slices as needed, without having to compile on each box. This is an amalgamation of different blog posts that did certain things really well, but not everything I wanted. The post I refer to specifically Installing PHP 5.3 on Ubuntu by Brandon Savage.
Thankfully, because of the apt-get package manager, the process is relatively short but will require you to know a bit about the linux command line and compiling to get the job done. Most of the external dependencies are loaded via apt-get, but the actual PHP install is compiled.