No longer working with PHP 5.2... If you need this version... More complicated as you usually need to run an older version of Apache (2.2 or older) as well... Probably easiest route if this is the case is to find an
older version of XAMPP with PHP 5.2...
If you are using WampServer as your WAMPP stack, it is relatively easy to switch out PHP / Apache / MySQL / Perl / Python version (once initially set up). You just need to find compiled binaries, save them to the corresponding "bin" folder, update the configuration files, and add a "wampserver.conf" file.
Mostly I've been working mostly with Apache 2.4 lately (compatible with more PHP versions - x64 binaries from ApacheLounge). Just remember to edit and enable the SSL configuration file (has all the required libraries, just no certificate file(s) and not enabled by default).
For PHP 5.3 / 5.4 I've been using the x64 binaries from
ApacheLounge. For PHP 5.5 / 5.6 I've been using the
official builds.