PHP 8.6 Launches With Partial Function Application, clamp(), and More
PHP 8.6 is slated for general availability on November 19, 2026, with its headline feature being partial function application, which lets a placeholder character create a closure from a function call. The author tested the examples in the PHP 8.6.0 release candidate Docker image and compared them against PHP 8.5.12. The update also adds a built-in clamp() function that replaces nested min and max calls and throws an error when its bounds are reversed. Other changes allow readonly properties to have default values and introduce an immutable Time\Duration class that makes time units explicit. The author expects these features to become part of everyday PHP development.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in