I used to have the same issues with PHP on xampp. After a while it started slowing down, there was no reason for it (code, mysql, apache were all fine).
The way I had gotten it to work was via xampp's command line interface. I had switched the networking interface from v4v6 to just v4; and that that had done the trick, then shortly after it slowed down again... so doing the v4 back to v4v6 fixed, but again worstened.
So, after working with xampp for a number of years, I found that wamp worked best and has no issues on Windows 7.
Download wamp; it's only 16mb too (compared to xampp's 44mb).
http://wampserver.com/