Generally speaking, you get whatever version the maintainers of the Linux distribution choose to package. With Ubuntu, that will be (roughly) the latest version available on the release date. This isn't a problem for 99% of the software out there, but since PHP is a unique and special butterfly, some problems may ensue.
My favorite method of working around it is to use apt's pinning function to pull in PHP from the previous release of Ubuntu (9.10):
http://blog.hoopycat.com/2010/07/runnin ... -10-04-lts
This seems to work out OK, since the libraries and other software PHP relies on don't have this reverse-incompatibility problem, and the 9.10 package seems to work just fine under 10.04
However, there's other ways that work as well... you can uninstall the existing PHP stuff and compile from source, use a third-party PPA, or use some other method. Each of these have their advantages and disadvantages. My primary motivation for choosing the pinning method was to keep updates simple, in the unlikely(*) event of a security issue in the PHP packages.
(*) That was sarcasm
_________________
Code:
/* TODO: need to add signature to posts */