PHP 8.1

Released 25 November 2021.


Major new features:

enums

readonly properties

first-class callable syntax, eg. strlen(...)

fibers

the never return type, and pure intersection types


Minor new features:

new in initializers, eg. function f($x = new Foo())

final class constants

array_is_list()

explicit octal integer literal notation, eg. 0o16