Netbeans, a fine text editor, now owned by Oracle, has an internal web server of its own. They have a quickstart page for NB PHP here:
NetBeans IDE PHP Quick Start Tutorial
That will take you through XAMPP setup if you follow the Windows setup. I prefer WAMP over XAMPP myself. That being said, NB's internal web server is a bit easier to set up; although I don't see a guide anywhere. It requires no additional software, too (aside from needed runtimes).
Download the latest PHP Zip from PHP Downloads. Extract it into some folder, such as in "C:\Program Files\PHP" for Win7 x86.
Here's what they do not tell you, and they really should: You will need a VC++ runtime if you don't already have it installed. Here's a link to one I needed:
Visual C++ Redistributable for Visual Studio 2015
I spent quite some time searching for the reason why it wouldn't load my page from localhost on this one, until I tried running PHP.exe from the command line - when it complained about the missing runtime. The Netbeans docs didn't say anything about it. You have to observe the recommendation for the runtime in the left column of the PHP download page. The readme says nothing about it.
In NB, go to Tools | Options | General and select the browser you want to use. (There is also an internal Netbeans browser, but it's not that great.)
Go to Tools | Options | PHP | General | PHP Interpreter and Browse to the PHP.exe from the folder you extracted your PHP archive into.
Create your NB PHP project, and edit the body of "index.php" so that you will see some message indicating that it works.
(Optional) Right-click on your project in the Projects window, and choose Properties. Under Run Configuration, set it to use whatever hostname and port you want for your local machine. It should default to something usable.
Right-click on you project in the Projects window, and choose Run. You should see "Internal Webserver ()" on the Status Bar on the bottom right. If you don't, there was probably a problem running PHP.exe. The webpage will probably pop up in the selected browser when you run the project by this point.
Using this method, the server displays all of my webpages perfectly, as far as I can tell. (Note: this answer previously mentioned M$ specific HTML code that didn't render correctly; but that problem appeared to have stemmed from different versions of IE - and now does not appear to have been the fault of the NB web server.)
This procedure may look complicated, but it is actually a bit easier; as most of these steps are required for XAMPP and WAMP as well.