A while back Mathew Turland posted a guide for getting a custom version of PHP compiled on a Windows machine.
At the encouragement of Elizabeth Smith, I went through the process (not-so-recently as of this blog entry) of compiling PHP on Windows.
He gives his "laundry list" of things to download/have access to and the link to Elizabeth's tutorial handy. Matthew found a few differences in his compile - an issue with IPv6 support and a pathing problem with the scripts trying to find libmysql.dll. He also throws in his instructions on getting aspell support compiled in.