Over a million developers have joined DZone.
Platinum Partner

Phalanger 3.0 updates for March 2012 - new features and better performance

· Performance Zone

The Performance Zone is brought to you in partnership with New Relic. Quickly learn how to use Docker and containers in general to create packaged images for easy management, testing, and deployment of software.

On February 2012, Phalanger – the PHP compiler for .NET – got a lot of new features, fixes and optimizations. You can see the full list of changes (still growing) at phalanger.codeplex.com/SourceControl/list/changesets. The most noticeable change is the performance of accessing PHP arrays and overall performance compared to previous versions and standard PHP itself!

Performance

You can check full benchmarking results at Benchmarks page. Phalanger performs great even in comparison with latest release of PHP using op-code cache. Still, there is a lot of other possibilities of improving Phalanger (planned for future releases).

Compared to standard op-code cached implementation of PHP, running on Windows, Phalanger is able to serve significantly more pages per second. Since Phalanger compiles PHP code into .NET assemblies which are later compiled into native machine code using .NET Just-In-Time compiler, the generated code uses maximum from your actual server’s CPU.

Phalanger performs compile time analysis of the code. It allows to build smaller op-code that does exactly what it has to do without an undesirable overhead.

Note in addition to better performance; Phalanger gives you .NET interoperability, security, compile-time code verification and powerful development environment, where you can debug your PHP projects as you are used to from C#.

New features

Phalanger is being more and more compatible with actual PHP 5.4 “specification”. List of missing features is smaller every month. You can take a look at wiki.php-compiler.net/Compatibility to ensure, there is really a little things missing. Most of PHP applications work out of the box, needing a little or none modifications.

Some new features:

  • Improved implementation of PHP array which saves memory and CPU ticks.
  • “filter” extension partially implemented.
  • PHP compatible mail()ing.
  • Faster concatenation, arithmetic operations, unary operators, …
  • Working with .NET IDictionary and IList seamlessly as with PHP arrays.
  • Nice(r) debug view using Phalanger Tools for Visual Studio.
  • flock() available on Windows.

Also we are running new discussion forum at support.devsense.com (which is unmodified Phalanger-powered phpBB). Feel free to ask/list or answer any question you’d like to.

The Performance Zone is brought to you in partnership with New Relic. Read more about providing a framework that gets you started on the right path to move your IT services to cloud computing, and give you an understanding as to why certain applications should not move to the cloud.

Topics:

Published at DZone with permission of Jakub Misek , DZone MVB .

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}