Native PHP support in Visual Studio 2010?

2019-01-11 12:42发布

问题:

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)

回答1:

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 http://www.280z28.org/images/vsx/ExpressionWebForPhp.png

My PHP extension for Visual Studio 2010 http://www.280z28.org/images/vsx/Vs10SamplePhp2.png



回答2:

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.



回答3:

I would recommend PHP Tools for Visual Studio - new PHP integration for VS2010 and VS11.

  • syntax highlighting
  • IntelliSense (tooltip, function assist, code completion, go to definition,...)
  • code navigation
  • custom file extensions
  • integrated documentation

Its basic features are free, it is fast and stable (preferred for me)



回答4:

As far as large projects, VS.Php 2.7 improved quite a bit in handling large projects (10000+ files)

Give it a try and let me know,

Juan

www.jcxsoftware.com



回答5:

It is not true that VS 2010 will natively support Php.

AFAIK the only options are vs.php and vs.php. ;)



回答6:

One of my projects has over 30,000 files, that includes however images and other items, in total about 12,000 php and js scripts, VS.php looked at it and barfed. Back to netbeans for now. Netbeans is amazing in what it does including the js support but I HATE java based apps. They are way too slow and fat.



回答7:

Visual Studio has various types of support for PHP through the links, tools, and projects listed here but not "native" support (meaning install just Visual Studio and be able to create PHP projectsa and websites).

WebMatrix, another Microsoft product (free) does have native support. You can install it via the Web Platform Installer and immediately start building PHP sites from scratch or install various PHP 3rd party solutions like WordPress, Drupal, etc.

WebMatrix also has pretty good support for MySQL (via the MySQL->Net connector, installable through the web platform installer, just search for MySQL in the Web PI tool). You cannot create new databases from within WebMatrix but you can create and edit tables and data once the database is created (just create the database through the mysql.exe command line).



回答8:

There is PHP Language Support, created by Sam Harwell. It has basic editing features for the PHP scripting language.

According to it's Visual Studio Gallery page, current editing features include:

  • Syntax highlighting, including support for HTML code outside PHP tags and within documentation comments
  • Outlining support for quickly collapsing classes and functions
  • Dropdown bars listing classes and functions within the current document This extension has a relatively small feature set, but it's quite fast and usable. It was created as part of an experiment to provide editor features for multiple languages within a single document (PHP, HTML, and formatted documentation comments).


回答9:

the best solution for true php projects whether small or large is "Zend Studio".



回答10:

Just use Komodo, they have both free and commercial IDE



回答11:

komodo is the best multi platform free version out there...



回答12:

phpDesigner7 was the best solution for PHP



回答13:

You can use PHP tools for Visual Studio:

PHP Tools for Visual Studio 2010, 2012, 2013



回答14:

You could use Dreamweaver. It has codehinting, dynamic error detection in code, support for most languages used on the web, support for css, html5 etc.