The first test release of the PXP programming language implementation has been published, which expands PHP with support for new syntactic constructs and enhanced capabilities of the runtime library. Code written in PXP is transpiled into regular PHP scripts that are executed using the standard PHP interpreter. Since PXP merely complements PHP, it is compatible with all existing PHP code. Notable features of PXP include an extended type system for better data representation and the use of static analysis, as well as the delivery of an extended class library to simplify writing secure code.
The first version is presented as an initial experimental prototype, not yet suitable for widespread use and testing the implementation written in PHP and using the PHP-Parser (the initial prototypes were attempted to be developed in Rust, but this idea was later abandoned). Among the extended features available in the first version is only support for multiline closures: $name = 'Ryan'; $hello = fn (): void { echo 'Hello, {$name}!'; }; $hello();
Future inclusion in PXP is being considered for features such as shorthand and block variants of the 'match' expression, a conditional 'return' operator, type aliases, generics, variadic types, immutable variables, pattern matching, and operator overloading.
Source: opennet.ru
