PHP 8.5 introduces several incremental improvements including OPcache becoming mandatory, final property promotion, attributes on constants, asymmetric visibility for static properties, new array_first() and array_last() functions, and easier access to error handlers. The release also deprecates the backtick operator, __sleep()/__wakeup() methods, and several SplObjectStorage methods while expanding the #[Override] and #[Deprecated] attributes to properties and traits.
Table of contents
OPcache Is Now a Mandatory Part of PHPFinal Property PromotionAttributes on ConstantsAsymmetric Visibility for Static PropertiesEasier Access to Error and Exception HandlersNew array_first() and array_last() FunctionsA Saner Directory Class#[Override] Can Now Apply to Properties#[Deprecated] Can Be Used on TraitsDeprecationsSort: