PHP 8.6 released with stricter session defaults and new APIs
Original title: PHP 8.6 is out, and here’s what changes for your code
Sessions now default to strict mode, HttpOnly and SameSite Lax, and failed file writes report failure.
PHP 8.6 adds partial function application, a Time\Duration class, an Io\Poll event-loop API and clamp(). Session defaults now enable strict mode and HttpOnly cookies and set SameSite to Lax. Failed flushes make fclose(), file_put_contents() and copy() return false, and many functions throw ValueError on bad input. mbstring regex functions and several aliases are deprecated; trim() now strips form feeds.
- Custom session handlers missing create_sid() and validateId() are deprecated.
- Sodium gains X-Wing and ML-KEM-768 post-quantum key encapsulation.
- TLS streams gain TLS 1.3 early data support.
- Developers recommend PCRE with the u modifier instead of mb_ereg().
- Products
- PHP
From the original article
2 min read at helpnetsecurity.com
PHP 8. 6 has been released. The new version adds partial function application, a Time\Duration class, a polling API for event loops and a clamp() function.
By Anamarija Pogorelec · helpnetsecurity.com
A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.