What's New in PHP 8.6

PHP 8.6 introduces language features like partial function application, a `clamp()` helper, improved stream error handling, and performance tweaks such as reduced ZTS overhead, prompting both enthusiasm and questions about how much complexity to keep adding to PHP. Commenters weigh the benefits of modern additions like async patterns, Fibers and better typing against longstanding pain points around Unicode handling, framework overhead, and backwards compatibility. The release also coincides with a set of critical security fixes, leading many to emphasize prompt upgrading and the ongoing security risks of older PHP deployments.

Core language/runtime changes

  • Many are excited about reduced ZTS (thread-safety) overhead, seeing it as a step toward a simpler “always ZTS” runtime and possibly better async primitives.
  • Stream error-mode improvements (throwing exceptions instead of returning false) are widely praised as a big quality-of-life and robustness win.
  • New additions like clamp(), SortDirection, a Duration class, improved polling APIs, and readonly defaults are seen as useful but not game‑changing.

Async, threading, and concurrency

  • Some hope lower ZTS overhead leads to first‑class async or parallelism similar to the parallel extension.
  • Others argue spawning threads from PHP is a design mistake; they favor single-threaded request handlers plus async I/O via extensions, generators, or Fibers.
  • There’s confusion/clarification: ZTS is mostly about threaded web servers, not user-level threads; Fibers already enable coroutine-style async, but integration with existing “shared nothing” code is considered cumbersome.

Security and release cadence

  • Multiple comments stress upgrading existing installations due to recently announced critical vulnerabilities; some note 8.6 includes relevant fixes.
  • Others highlight that these security releases are part of a regular four‑week cadence, not an emergency out‑of‑band drop, though the severity is acknowledged as “critical.”
  • Links to recent GHSA advisories and blog posts show several serious issues, mostly affecting 8.5+, with some debate over exploitability in real deployments.

Unicode and string model

  • Criticism that PHP still lacks “builtin Unicode support” as a first-class string model.
  • Counterpoint: PHP’s “strings as bytes, usually UTF‑8” plus mb_* functions is defended as workable and simpler than Perl’s dual octet/Unicode model, though others call mb_*-style APIs outdated and clumsy, especially for CJK use cases.

Partial application, pipes, and ergonomics

  • Partial function application (PFA) and the |> pipe operator draw mixed reactions:
    • Fans like the expressiveness and reduced boilerplate compared to ad‑hoc closures.
    • Skeptics find ?-placeholders cryptic and worry declarations will resemble calls too closely.
    • Some recommend adopting pipes only once PFA is available (8.6) to avoid verbose lambdas.

Language direction, complexity, and ecosystem

  • Long-running “PHP bad” vs “modern PHP is fine” debate:
    • Supporters emphasize fast startup, per-request isolation, and single‑threaded simplicity.
    • Critics point to a growing, complex surface area, lingering footguns (e.g., stream wrappers), weak type safety (heavy PHPDoc reliance), odd array semantics, and framework overhead.
  • Performance benchmarks for frameworks like Laravel/WordPress spark disagreement on whether they’re “slow” or acceptable, with notes that benchmarks are imperfect and context‑dependent.

php.net page UX

  • Some complain about scroll‑slowing animations on the release page.
  • Others note the site respects prefers-reduced-motion; debate follows on whether most users actually like animations or merely tolerate them.