PHPEye开源社区 » PHP技术讨论区 » [PHP最新进展].NET Framework环境下的PHP编译器
《Programming PHP》第二版上市
2008-6-5 09:27 altair
[PHP最新进展].NET Framework环境下的PHP编译器

.NET Framework环境下的PHP编译器
May 31, 2008

原文链接:[url=http://phpimpact.wordpress.com/2008/05/31/php-compiler-for-the-net-framework/]http://phpimpact.wordpress.com/2008/05/31/php-compiler-for-the-net-framework/[/url]

Phalanger是PHP的另一种实现,它可以将PHP脚本编译成MSIL(Microsoft Intermediate Language)文件,从而可以在.NET或Mono环境下运行。(Mono是一种跨平台的.NET开发/运行环境,具体可见其主页: [url=http://www.mono-project.com/]http://www.mono-project.com/[/url])。

Phalanger主要特征:
(1) 将PHP脚本编译成MSIL。
(2) 将PHP脚本直接编译成.NET/Mono汇编程序。
(3) Phalanger使得PHP脚本可直接使用任意的.NET对象。
(4) 在PHP中使用对象是通过PHP/CLR扩展实现的。
(5) 使PHP开发的库可以在其它的.NET开发语言中使用。
(6) 允许使用.NET泛型,使用PHP开发和扩展泛型对象
(7) 允许编写完全兼容.NET语言(如C#)的对象
(8) 使用Phalanger甚至可以使用C#编写应该用程序的商业逻辑模块,使用PHP作表现层

有关Phalanger的资料请参考: [url=http://php-compiler.net/]http://php-compiler.net/[/url]

希望有兴趣的同志研究研究一下哈...
...
原文内容:
Phalanger makes PHP first-class citizen in the .NET languages family. It gives PHP programmers the ability to benefit from both the ease-of-use and effectiveness of the PHP language and the power and richness of the .NET platform taking profit from the best from both sides.
I have to admit, I’m a big fan of .NET and Anders Hejlsberg, the lead architect of the team developing C#. That’s right, I said it! I’m a fan of .NET! Anders created an excellent programming language, which has a procedural, object-oriented syntax based on C++ and includes influences from aspects of several other programming languages, most notably Delphi and Java. C# and PHP have a lot in common, they are both simple, modern, object-oriented programming languages. In fact, a lot of C# programmers are familiar with PHP, and vice versa.
What is Phalanger?
Phalanger is a new PHP implementation introducing the PHP language into the family of compiled .NET languages. It provides PHP applications an execution environment that is fast and extremely compatible with the vast array of existing PHP code. Phalanger compiles PHP scripts into MSIL (Microsoft Intermediate Language) which can be executed by .NET or Mono runtime. This runtime executes MSIL code using JIT (Just-In-Time) compilation, which makes the execution far more effective than interpretation and significantly improves application speed.
Thanks to the Visual Studio 2008 Shell provided by Microsoft, you can now get Visual Studio with Phalanger for free.
Phalanger Features
Compiles PHP language to the MSIL (Microsoft Intermediate Language), which is a byte-code assembly used by the .NET CLR
Compiles PHP scripts directly to the .NET/Mono assemblies
Phalanger makes it possible to use any .NET object in PHP applications
Allows using .NET objects from the PHP language thanks to the PHP/CLR Language Extensions
Enables using libraries written in PHP from other .NET languages
Allows using .NET generics including writing and extending generic objects in the PHP language
Allows writing objects fully compatible with .NET languages (like C#) in the pure mode
Thanks to Phalanger you can use PHP for developing presentation layer on top of bussines logic written in C#
Tutorials
Phalanger Website
PHP for .NET: Introduction for .NET developers
Phalanger for Mono users
Writing Silverlight applications in PHP

2008-6-7 01:54 布老虎
什么时候能把PHP脚本编译成运行时动态库就好了。

2008-6-17 17:15 七月十五
Zend Studio for Eclipse如何?

页: [1]


Powered by Discuz! Archiver 5.5.0  © 2001-2006 Comsenz Inc.