Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Native PHP support in Visual Studio 2010?

Is there any truth to the rumor that Visual Studio 2010 will natively support PHP coding?

(http://www.codeplex.com/php4vs)

If not,what are the options?(except VS.php)

like image 211
Balchev Avatar asked Dec 15 '09 23:12

Balchev


People also ask

Does Visual Studio supports PHP?

PHP in Visual Studio Code. Visual Studio Code is a great editor for PHP development. You get features like syntax highlighting and bracket matching, IntelliSense (code completion), and snippets out of the box and you can add more functionality through community-created VS Code extensions.

Is Visual Studio 2010 supported?

Visual Studio 2010 and earlier versions are no longer supported.

How can I run PHP code in Visual Studio without xampp?

Configuring VS Code To Run PHP Code Go to File -> Preferences -> Settings. 2. Add the following JSON to the User Settings on the Right Hand Side of the IDE. Replacing C:\\xampp\\php\\ with your path to your php.exe.


2 Answers

Visual Studio 2010 won't have native PHP support. However, it's "relatively easy" to add some language support to Visual Studio 2010. If all you want is syntax highlighting, auto comment/uncomment, and brace matching, it could be done in one sitting by someone who knows how the new extensibility model works.

After you wrote this post, I started making an add-in to show you what I mean. I downloaded the WordPress source only to note that the .php extension is registered with Expression Web 3, which does support PHP (first image).

My 15 minute attempt at an extension (second image) is not as impressive, but keep in mind I started working on it after I answered this question. Edit: Updated to color keywords/global functions/global objects separately.

Microsoft Expression Web for PHP
(source: 280z28.org)

My PHP extension for Visual Studio 2010
(source: 280z28.org)

like image 88
Sam Harwell Avatar answered Sep 25 '22 04:09

Sam Harwell


Check out CodeLobster php, it's free and has a very similar look and feel to visual studio plus it has IntelliSense and debugging support.

like image 14
Crackerjack Avatar answered Sep 26 '22 04:09

Crackerjack