Over a million developers have joined DZone.

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

DZone's Guide to

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

· Performance Zone
Free Resource

Transform incident management with machine learning and analytics to help you maintain optimal performance and availability while keeping pace with the growing demands of digital business with this eBook, brought to you in partnership with BMC.

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!


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.

Evolve your approach to Application Performance Monitoring by adopting five best practices that are outlined and explored in this e-book, brought to you in partnership with BMC.


Published at DZone with permission of Jakub Misek, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


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

{{ parent.tldr }}

{{ parent.urlSource.name }}