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

Discover 50 of the latest mobile performance statistics with the Ultimate Guide to Digital Experience Monitoring, brought to you in partnership with Catchpoint.

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.

Is your APM strategy broken? This ebook explores the latest in Gartner research to help you learn how to close the end-user experience gap in APM, brought to you in partnership with Catchpoint.


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 }}