We are polishing up the project while continuously testing bigger and bigger applications. With the recent updates and fixes, we’ve been able to run popular components like Guzzle, Twig, HTMLPurifier, RandomLib, PHPUnit, DOMPdf, and more.
- ASP.NET Core logging (ILoggerFactory service) is used to log PHP warnings and notices.
- The compiler evaluates
file_exists(), arithmetic, and other operations.
- Emitting and understanding C#-8 nullability context.
The components listed above are all part of large frameworks and solutions from the rich PHP ecosystem. Let’s take a look at what’s new in PeachPie and what was necessary to fix in order to get it all to work.
- PHP 8 support; the syntax and the new API is supported. See the tracking issue for details.
- Fixed autoloading mechanism; this integrates class autoloading right into the runtime and gets rid of performing autoload during runtime, making autoloading seamless without the need of including the magic “autload.php” file. Read more at peachpie.io/2020/05/autoloading-and-composer.html.
- Dozens of compile-time issues fixed.
- cURL library improvements; the library provides cURL functionality to PHP code, now with more features and supported options. This allows, for example, Guzzle to work on .NET.
- Our ASP.NET Core middleware parses the path info correctly; this simulates the PHP application life cycle correctly.
- Conversion of a float number to string respects PHP conventions.
- Fixed array functions, enabling the use of the Elementor WordPress plugin.
- Debug sequence points for property initializers provide a nice touch when debugging PHP code, so you can step through the PHP properties. This is not possible with regular PHP.
- Legacy ASP.NET (IIS Integrated Pipeline) request handler. See docs.peachpie.io/scenarios/beginner/full-net-framework/#aspnet-application for details.
- Nested .NET classes can be used in PHP code.
Bringing more exciting solutions to .NET – we’re keen to make the 25+ years of the PHP community’s work available to .NET applications. Regardless of what anyone thinks of either platform, the lively open-source PHP ecosystem has produced a plethora of projects over the years that have found their usecase. .NET, on the other hand, particularly with the direction of its development in the last 5-7 years, has turned into an absolute powerhouse and left its high-pricetag reputation well behind.
PeachPie is an effort to create a symbiotic relationship of the two platforms and provide developers with the advantages of each.