开发者

How PHP is used as .NET language (ASP.NET in the specific)?

I read in some Microsoft documentation that PHP, together with Ruby on Rails, is now "part" of the .NET languages.

I would like to know whether its way of working (within .NET) is similar to C# and VB.NET. In the specific: 1) Is the PHP code compiled by the CLR into IL? 2) Is it possible to interchangeably use .NET code written in PHP as it already happens with C# and VB.NET (components written in C# can be used by VB.NET and the other way around)?

3) Is Visual Studio going t开发者_如何学JAVAo support somehow an IntelliSense function for PHP?

4) Is PHP syntax kept in .NET or there are some modifications?

I ask you this questions because PHP is a language that from many point of view (for instance the typing) is totally different than the other .NET languages. Last but not least I do not see any advantage in compiling PHP into IL, because many of its strenghts stand in its interpreted language nature.

Thanks

Francesco


Well, maybe I'm absolutely wrong, but officially .net-supported server scripting languages are Python and Ruby.

If you want to do that, you'd check Phalanger, an open source PHP compiler for .NET:

  • http://phalanger.codeplex.com/

And yes, it compiles PHP into MSIL, meaning that'd work on top of .NET CLR. I know there's a compilation option or configuration that let's you code in PHP and use .NET libraries.


PHP can be compiled using Phalanger. I don't know much myself so I can only give you this starting point.

Good luck,
Alin


I assume you're talking about the Iron (I Run on .NET) languages. Like IronRuby, IronPython

PHP is not an official language supported on the runtime, however there are OSS tools IronPHP and Phalanger that will do it for you.

These are dubiously supported and not really in common use as far as I know.

  1. Yes.
  2. Yes (at least you can with IronRuby/IronPython)
  3. No idea.
  4. PHP syntax.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜