Skip to content

Implementation status

Timm Friebe edited this page Apr 17, 2024 · 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 PHP 8.2 PHP 8.3
Future PHP?
new ... without parentheses
Typed class constants ✔(1) ✔(1) ✔(1) ✔(1) ✔(1) ✔(1) ✔(1) ✔(1) ✔(1)
Nullable casting
Match without expression
fn with block
Hack
Using statement / Disposables
Function types ✔(1) ✔(1) ✔(1) ✔(1) ✔(1) ✔(1) ✔(1) ✔(1) ✔(1)
Array and map types ✔(1) ✔(1) ✔(1) ✔(1) ✔(1) ✔(1) ✔(1) ✔(1) ✔(1)
PHP 8.3
Marking overridden methods native
Dynamic class constant fetch native
Arbitrary static variable initializers native
PHP 8.2
True type ✔(6) ✔(6) ✔(6) ✔(6) ✔(6) ✔(6) ✔(6) native native
False type ✔(6) ✔(6) ✔(6) ✔(6) ✔(6) ✔(6) ✔(6) native native
Null type ✔(1) ✔(1) ✔(1) ✔(1) ✔(1) ✔(1) ✔(1) native native
Readonly classes native native
PHP 8.1
Array unpacking with string keys native native native
Readonly properties native native native
Pure intersection types ✔(1) ✔(1) ✔(1) ✔(1) ✔(1) ✔(1) native native native
First-class callable syntax native native native
Never return type ✔(5) ✔(5) ✔(5) ✔(5) ✔(5) ✔(5) native native native
New in initializers ✔(4) ✔(4) ✔(4) ✔(4) ✔(4) ✔(4) ✔(4) ✔(4) ✔(4)
Enumerations native native native
Octal integer literal notation native native native
PHP 8.0
Static return type native native native native
Match expression native native native native
Named Arguments ✔(3) ✔(3) ✔(3) ✔(3) ✔(3) native native native native
Mixed type ✔(1) ✔(1) ✔(1) ✔(1) ✔(1) native native native native
Attributes / Annotations
Null-safe instance operator native native native native
Constructor argument promotion native native native native
Throw expressions native native native native
::class on objects native native native native
Union types ✔(1) ✔(1) ✔(1) ✔(1) ✔(1) native native native native
Arbitrary expression support for new native native native native
PHP 7.4
Spread Operator in Array Expression native native native native native
Numeric Literal Separator native native native native native
Arrow functions native native native native native
Property types ✔(1) ✔(1) ✔(1) ✔(1) native native native native native
PHP 7.3
list() Reference Assignment native native native native native native
Trailing commas in function calls native native native native native native
PHP 7.2
Trailing commas in grouped namepaces native native native native native native native
Object type ✔(1) ✔(1) native native native native native native native
PHP 7.1
Multiple catch native native native native native native native native
Void ✔(1) native native native native native native native native
Iterable ✔(1) native native native native native native native native
Constant modifiers ✔(1) native native native native native native native native
Short list syntax native native native native native native native native
Allow specifying keys in list() native native native native native native native native
Nullabe types ✔(1) native native native native native native native native
PHP 7.0
Unicode escape sequences native native native native native native native native native
Grouped use ✔(2) ✔(2) ✔(2) ✔(2) ✔(2) ✔(2) ✔(2) ✔(2) ✔(2)
Null coalesce (??) native native native native native native native native native
Comparison (<=>) native native native native native native native native native
Scalar types native native native native native native native native native
Return types native native native native native native native native native
Variable syntax native native native native native native native native native
Anonymous classes native native native native native native native native native
Keywords as methods native native native native native native native native native
Generator "yield from" native native native native native native native native native
Generator return native native 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.
  6. True and false types emitted as bool.
Clone this wiki locally