Skip to content

Update 1.1.13 and PHP 8.5 Pipe Operator

We're happy to announce the public availability of PeachPie 1.1.13. This is a version bump with a few security updates and new syntax features.

PHP 8.5

The upcoming PHP 8.5 introduces the new pipe operator |>. Similar to the pipe operator in Bash, it passes the result of the left operand as the argument to the callable on the right, efficiently allowing function calls to be chained without ugly nesting.

PeachPie already supports it!

$result = "Hello World"
    |> strtoupper(...)
    |> str_shuffle(...)
    |> trim(...);

Even though it may be considered syntactic sugar, keep in mind that the right operand is a callable object, not a function call. This may incur a performance penalty.

As in the example above, strtoupper(...) uses the new first-class callable syntax introduced in PHP 8.1, which creates a callable to the strtoupper function.

The compiler may emit a very short sequence of IL opcodes, such as:

.ldstr "Hello World"
.call strtoupper

Alternatively, the compiler may treat it as a dynamic function invocation: resolving the function at runtime, loading arguments into a parameter array, and performing the call dynamically.

We will address this in the next PeachPie update.

Version Bumps

PeachPie libraries rely on several third-party packages, such as SixLabors. We have bumped versions to address known vulnerabilities in those packages.

.NET 6

You may notice the compiler and libraries are built using .NET 6. We strive to remain compatible with legacy projects, although upcoming updates will target .NET 10 to take advantage of new C# and .NET features.