Not familiar with Slackware, but since it's using apt, well...it should be the same old apt I'm used to with Debian and Ubuntu. Futhermore, I know that the Debian Sarge stable branch doesn't exactly include up-to-date installs (which makes it very stable.) I'm assuming slackware may not be too different in the same respect and that you may need to find some backport repositories or just keep using the stable branch, but install some testing or unstable packages. The latter is called Apt Pinning.
Also, you could try just uninstalling php using apt and download source and build the new version.