PHP is not just markup like HTML. It's a scripting language that has to be interpreted by a PHP server, which then outputs HTML to a browser. You can't just "preview" PHP. If you get yourself a web server running, like Apache, then you can easily execute PHP files as long as they are within the directory Apache is setup to serve.