You need to have a web server through which you open it. Just entering the file: ///whatever.php does not work, because then the file is not processed by PHP.
You can select multiple web servers, but my advice is Apache is the most popular web server in the world. It works for me on my laptop with Windows XP along with PHP, and it is easy to install and configure, and it works fine. There are many modules that can be installed later if you need them. It is also free, not only in free beer, but also in open source.
source share