Setting of Visual Studio for PHP Development

Introduction

PHP tools for Visual Studio easily integrated with Microsoft Visual Studio and gives the full support of the PHP language. This tool understands the code, provides the intellisense, quick navigation, syntax error checking, PHP manuals, debugging, and much more.

In this article, we will learn how to install PHP in Microsoft Visual Studio. Microsoft Visual Studio is not made for PHP, but we can run our PHP code using the extensions.

There are two ways to install "PHP tools for Visual Studio". I will demonstrate both ways, step-by-step.

Prerequisites

  • Visual Studio 
  • Internet connection

PHP tools for Visual Studio

When you are outside of the Visual Studio you may choose a setup file from the Microsoft website.

Download and install

The "PHP tools for Visual Studio" package from Microsoft website.

Add-on from the Extension Manager

When you are within Visual Studio, you may choose this way to install the PHP add-on from the Extension Manager.

Open Visual Studio and use the following instructions.

Go to "Tools" -> "Extension Manager" -> "Online".

Type PHP in the search box.

ExtensionMAnager

Follow the instructions and install it.

After the installation you will able to work on PHP projects in the project wizard.

Demo

Select PHP Web Project and write the PHP code.

Step 1

Select New Project.

Step 2

Select PHP project.

StartNewProject

Step 3

The following is PHP code to print hello world:

<?php
echo
"Hello World!";
?>

Output

OutputScreen
Summary 

This article described how to install PHP tools for Visual Studio in the Microsoft Visual Studio, also a simple PHP code in PHP website.


Similar Articles