Richard Thomas has posted a script that could be used to set up a complete PHP-enabled instance of CentOS from a basic install. He's posted about it on his blog.
I compile php all the time, I am constantly installing the latest versions on my own servers for various reasons. After doing this the first dozen or so times I started creating little batch files. [...] The other day someone asked something about my setup and I had to pull open the script to remember what I had going on and he asked for a copy and hence I figure others might be interested as well.
He's shared out the file here and it installs all the usual tools you might need including MySQL support with PHP being the only thing compiled from scratch.