Phalanger use cases

From PhalangerWiki

Jump to: navigation, search

Phalanger combines standard PHP and .NET. It opens the whole new world for PHP applications and components and for .NET projects.

Contents

Usages

Thanks to Compilation, .NET interoperability and high Compatibility, Phalanger can be used in many standard and non-standard situations. Also it makes the integration very easy and intuitive.

Scripting engine

Phalanger provides API for .NET applications to process PHP scripts. PHP as a scripting language for C# article shows simple usage. There are several C# projects offering their users to extend or write plugins in PHP. With Phalanger you can easily limit or extend set of functions available in Your scripting language.

WordPress .NET

See WpDotNet.com for all-in-one package. Phalanger is able to compile and run well-known open-source web sites, like WordPress. With this ability, you can extend them with plugins written e.g. in C# language. You can combine functionality of PHP project with ASP.NET security, performance or other .NET libraries, using standard PHP syntax.

Framework for proprietary applications

Phalanger helps you with the migration from PHP to .NET. Keep your old PHP code, and reuse it in your new ASP.NET interface.

.NET version of PHP component

By combining simplicity of ASP.NET server control definition with PHP code behind, you can take an existing PHP control and integrate into ASP.NET web site.

Obfuscation

Protect your source code with obfuscation. This allows you to redistribute your PHP project without revealing the source code.

64-bit PHP on Windows

Phalanger is completely managed and allows you to take advantage of 64-bit platform on Windows systems. With Phalanger you are not limited any more. Phalanger can use the whole memory space is your application has high memory requirements.

Performance enhancement

Phalanger's compile time analysis and .NET just-in-time compilation optimizes your PHP code twice, for your actual hardware.

Code validation

Compile time analysis reveals possible issues, which validates your code without a need of running it. Phalanger warns you about dangerous code fragments and invalid code usages. This can be used just to verify your code without a need of using Phalanger in production.

Enhance PHP code with .NET functionality

You can simply add a reference to a .NET project or an existing .NET assembly and use classes and methods from them in the standard PHP way:

\System\DateTime::$Now
Phalanger is even able to handle generics and method overloading.

Migrate PHP code to .NET platform

Take an existing PHP code and continue with development in C#. You can continuously rewrite critical PHP code into C# and keep everything running.

PHP Framework API

Phalanger provides API for accessing and manipulating PHP runtime context. You can process PHP scripts from C#, and read initialized variables, use declared functions and instantiate declared classes. Or you can inject .NET methods into the PHP context and let your PHP scripts to seamlessly use .NET as it would be written in PHP.

References

  1. http://www.amain.com/FromTheCEO/2012/03/10/php-on-windows-what-a-silly-idea/
  2. http://wpdotnet.com