Skip to content

Implementation status

Timm Friebe edited this page Jul 12, 2021 · 59 revisions

The following table gives an overview of the current implementation status. The goal is to have check marks everywhere!

Feature PHP 7.0 PHP 7.1 PHP 7.2 PHP 7.3 PHP 7.4 PHP 8.0 PHP 8.1
Future PHP?
Nullable casting
Match without expression
fn with block
Hack
Using statement / Disposables
Function types ✔(1) ✔(1) ✔(1) ✔(1) ✔(1) ✔(1) ✔(1)
Array and map types ✔(1) ✔(1) ✔(1) ✔(1) ✔(1) ✔(1) ✔(1)
PHP 8.1
First-class callable syntax native
Never return type ✔(5) ✔(5) ✔(5) ✔(5) ✔(5) ✔(5) native
New in initializers ✔(4) ✔(4) ✔(4) ✔(4) ✔(4) ✔(4) ✔(4)
Enumerations native
Octal integer literal notation
PHP 8.0
Static return type native native
Match expression native native
Named Arguments ✔(3) ✔(3) ✔(3) ✔(3) ✔(3) native native
Mixed type ✔(1) ✔(1) ✔(1) ✔(1) ✔(1) native native
Attributes / Annotations
Null-safe instance operator native native
Constructor argument promotion native native
Throw expressions native native
::class on objects native native
Union types ✔(1) ✔(1) ✔(1) ✔(1) ✔(1) native native
Arbitrary expression support for new native native
PHP 7.4
Spread Operator in Array Expression native native native
Numeric Literal Separator native native native
Arrow functions native native native
Property types ✔(1) ✔(1) ✔(1) ✔(1) native native native
PHP 7.3
list() Reference Assignment native native native native
Trailing commas in function calls native native native native
PHP 7.2
Trailing commas in grouped namepaces native native native native native
Object type ✔(1) ✔(1) native native native native native
PHP 7.1
Multiple catch native native native native native native
Void ✔(1) native native native native native native
Iterable ✔(1) native native native native native native
Constant modifiers ✔(1) native native native native native native
Short list syntax native native native native native native
Nullabe types ✔(1) native native native native native native
PHP 7.0
Unicode escape sequences native native native native native native native
Grouped use ✔(2) ✔(2) ✔(2) ✔(2) ✔(2) ✔(2) ✔(2)
Null coalesce (??) native native native native native native native
Comparison (<=>) native native native native native native native
Scalar types native native native native native native native
Return types native native native native native native native
Variable syntax native native native native native native native
Anonymous classes native native native native native native native
Keywords as methods native native native native native native native
Generator "yield from" native native native native native native native
Generator return native native native native native native native

Notes:

  1. Currently unchecked.
  2. Namespaces are resolved by the compiler and emitted fully qualified.
  3. Only in the correct order.
  4. Except for class constants.
  5. Emitted as void.
Clone this wiki locally