does not matter which first.
I should start with MySQL .. can be the tricky one.
MySQL, at least when I upgraded last week, ( from one MySQL5.x to a later)
required previous version totally removed.
Several hours of deleting in registry etc. etc.
Backup your mysql data! Make a copy of the '/mysql/data/' folder.
At least for me, in Windows XP, I never need to uninstall PHP, for newer version.
But I never install PHP .. I just download the ZIP file of php5.2.4-win32.zip
and unzip where I want it.
Regards 🙂