New FeaturesPHP CoreReadonly AmendmentsAnonymous classes may now be marked as readonly. Readonly properties can now be reinitialized during cloning. Typed Class ConstantsClass, interface, trait, and enum constants now support type declarations. Closures created from magic methodsClosures created from magic methods can now accept named arguments. The final modifier with a method from a traitThe final modifier may now be used when using a method from a trait. Override AttributeAdded the #[\Override] attribute to check that a method exists in a parent class or implemented interface. Fetch class constant dynamically syntax
Class constants can now be accessed dynamically using the
Static variable InitializersStatic variable initializers can now contain arbitrary expressions. Fallback value syntax for ini variablesphp.ini now supports fallback/default value syntax.
CLIIt is now possible to lint multiple files. DOMAdded properties DOMElement::$className and DOMElement::$id. These are not binary-safe at the moment because of underlying limitations of libxml2. This means that the property values will be cut off at a NUL byte. Added properties DOMNode::$isConnected and DOMNameSpaceNode::$isConnected. Added properties DOMNode::$parentElement and DOMNameSpaceNode::$parentElement. FFIIt is now possible to assign FFI\CData to other FFI\CData. Meaning CData can now be assigned to structs and fields. Opcache
POSIX
posix_getrlimit now takes an optional
posix_isatty now raises type warnings for integers following the usual ZPP semantics. posix_ttyname now raises type warnings for integers following the usual ZPP semantics and value warnings for invalid file descriptor integers. Streams
Streams can now emit the |