Developers

PHP 8.6 ships with partial function application and a native polling API

PHP 8.6.0 is out, giving the language behind a large share of the web partial function application, where a call that leaves some arguments as placeholders returns a closure waiting for the missing ones. Other headline additions are Io\Poll, which uses epoll, kqueue, event ports or WSAPoll so event loops such as ReactPHP and AMPHP can go past the 1024 connection cap of stream_select(), a \Time\Duration class with nanosecond precision, a clamp() function, a SortDirection enum and default values for readonly properties. Before upgrading, teams should note that sessions now default to strict mode, HttpOnly cookies and SameSite=Lax, trim() also strips form feeds, and return inside finally, spl_object_hash() and the mb_ereg() family are deprecated.