Announcing the minor update to the PeachPie compiler platform – the version 1.0.6. It implements the latest feature requests, keeps up with the PHP 8.1 specs, and fixes a few bugs.
How To Update
Make sure you are referencing the
1.0.6 version of the
PeachPie.NET.Sdk, and corresponding packages. See the documentation for an example of the project file (Project file) or create a new project as described on the Get Started page.
The new major update to the PHP language is version 8.1. Since PeachPie 1.0.6, the compiler and the runtime already support some RFCs, e.g.:
- octal number syntax
See the tracking issue #959 for the detailed progress on PeachPie’s PHP 8.1 support.
A few SPL classes were behaving incorrectly, or at least differently to the PHP implementation.
ArrayObject were fixed to be properly enumerable. This means they are not only enumerable in PHP, but the object is also enumerable in the .NET world as it’s expected to be.
We have worked on making the emitted byte code more compatible with what the C# compiler would generate, although sometimes the PeachPie compiler generates something that can’t be created using the C# language – for example loading of a certain method and type CIL tokens. Also, the goal of this release was to make the emitted IL smaller or at least using fewer new value types on the stack. See #8980 and #49842 for more details.
In addition to the generated IL, the new release fixes the compilation of
list() with nested arrays (#957), the behavior of
FETCH_COLUMN, and implicit conversions from number to an array key.
Thank you all for your issue reports and the feedback! We’re now running a lot of amazing projects on PeachPie, and continuing with the progress.