What’s new in PeachPie preview4

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.

New Features

  • ASP.NET Core logging (ILoggerFactory service) is used to log PHP warnings and notices.
  • The compiler evaluates include(), file_exists(), arithmetic, and other operations.
  • Emitting and understanding C#-8 nullability context.

Fixes

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.

Interoperability improvements:

  • 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.

What’s next?

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.

Posted on December 8, 2020, in category Information, News, tags: , , , ,