Skip to content
NewA calmer, faster ZeroHour

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

Help Net Securityby Anamarija Pogorelec ()2 min read1 · 1 read
AI summary · x-ai/grok-4.7Summaries by Vani AI

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.

Key facts
  • 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().
Analyze this story with Vani AIImpact, who is affected and what defenders should do, in a new chat

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.

Help Net Security

By Anamarija Pogorelec · helpnetsecurity.com

Read the full article at Help Net Security

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.