Is there a possibility of there ever being a PHP.NET?

后端 未结 13 1002
[愿得一人]
[愿得一人] 2020-12-06 06:40

Sorry if this is a silly and/or stupid question but... Will there ever be, or would it even be possible to have a PHP.NET? Or have I got the wrong end of the stick?

相关标签:
13条回答
  • 2020-12-06 06:44

    .NET is a framework that is based on a number of technologies such as CLR and provides an extensive collection well-organized class libraries that are suitable for almost all conceivable functions that are used in Web applications. In addition, it allows you to easily create components that extend the framework.

    Although PHP has similar properties, such as PEAR libraries, PHP and ASP.NET are not really identical, because the .NET framework ab ovo on an OOP paradigm and OOP-based approaches, and PHP is not. This difference is most evident in the way, is how to access classes and objects in PHP and ASP.NET.

    0 讨论(0)
  • 2020-12-06 06:47

    PHP have got suspiciously pally with Windows... it doesn't seem impossible

    And besides PHP.NET

    0 讨论(0)
  • 2020-12-06 06:48

    you could develop php on windows to use windows functions, and ultimately call on .NET objects. I believe apache now allows php to call on native windows calls/functions and .NET functions/classes/objects, provided you have the right settings turned on.

    as for .NET adapting php syntax, i think some people are trying to do this, aside from the existing attempts.

    0 讨论(0)
  • 2020-12-06 06:54

    Actually it exists. It's not called PHP.NET, but Phalanger(http://phalanger.codeplex.com). It compiles PHP code into MSIL instructions.

    It allows to run PHP application in so called legacy mode (and you can benefit from a faster running time since it's compiled), and if you want to use CLR features that are not present in PHP you can turn on PHP/CLR compiler extensions.

    There is also so called Pure mode where PHP langauge is modified to behave more like C# or Visual Basic.

    I think combining PHP and .NET is great idea, since you can make the best of both worlds. From PHP it would fast development and deployment process, steep learning curve and there are lots of great PHP open-source applications. On the .NET side, verifiable ISO standartized environment, peformance, managed secure code, advanced development tools,...

    0 讨论(0)
  • 2020-12-06 06:55

    Sure, there's a possibility. Python runs in the CLR, after all.

    Side note: PHP is now a one-click install for IIS, so if you're waiting to bring PHP into your Microsoft stack, go ahead and give it a try. MS is even working on a PHP bytecode cache for Windows.

    0 讨论(0)
  • 2020-12-06 06:56

    You could give a try to the jsc project which will convert MSIL to php source for you.

    This will enable you to write C# code in visual studio and run it on an inexpensive php server.

    0 讨论(0)
提交回复
热议问题