Skip to content

docs(opcache): align hot-swap statics wording with the PHP 8.5 ownership model - #274

Merged
lisachenko merged 1 commit into
masterfrom
claude/opcache-85-docs-statics
Aug 20, 2026
Merged

docs(opcache): align hot-swap statics wording with the PHP 8.5 ownership model#274
lisachenko merged 1 commit into
masterfrom
claude/opcache-85-docs-statics

Conversation

@lisachenko

Copy link
Copy Markdown
Owner

What this changes

A docs-only follow-up from auditing both branches' opcache-limitation docs after the epic landed. One pre-existing staleness found, on master only (it predates the #273 cascade — the code changed when the minted-duplicate machinery was removed, the doc didn't):

  • docs/hot-swap.md — the "Static variables are unshared" bullet still described the PHP 8.4 mechanics (the swap duplicating the defaults via zend_array_dup). On PHP 8.5 no donor kind owns the defaults table (zend_create_closure_ex duplicates into the map slot only): only the live ZEND_MAP_PTR slot is unshared and the body refcount guards the shared defaults. The bullet now states that model and points at FunctionBodySwap::unshareStaticVariables(). The 8.4 branch's wording stays as-is — it is correct for the 8.4 engine.
  • docs/opcache-binary.md — the "every payload shape of the 8.4 walker" phrase now reads as the engine walker's shapes, PHP 8.5-only ones (attributed constants, closures in constant expressions) included, since this line handles them.

Everything else audited clean and consistent across both branches: ZTS supported since #118, Windows an intentional non-goal, 32-bit refused, macOS/arm64 with the addressing-model tripwire, graph growth (#117) scoped, #121 recorded infeasible with refresh() as the SHM path, CacheImageSync (#122) documented, the optimizer/hasLocalVariable docs, and the inheritance-cache decline row.

Environment it was verified on

  • PHP version: n/a — docs-only change (cs-fixer clean, 353 files)
  • Thread safety: n/a
  • OS / architecture: n/a
  • Debug build (--enable-debug)? no

Checklist

  • Targets the correct branch: master only — the corrected wording is PHP 8.5-specific; 8.4's text is right for 8.4
  • composer test unaffected (no code changed)
  • composer cs:check green; PHPStan unaffected
  • Tests — n/a (docs)
  • No generated files touched
  • Conventional Commits used

🤖 Generated with Claude Code

https://claude.ai/code/session_01BDcCQiYqbMkjRPyhWgLL6M


Generated by Claude Code

…hip model

The "Static variables are unshared" bullet in docs/hot-swap.md still described
the PHP 8.4 mechanics (the swap duplicating the defaults via zend_array_dup) -
wording the code on this line dropped when the minted-duplicate machinery was
removed: on PHP 8.5 no donor kind owns the defaults table, only the live
ZEND_MAP_PTR slot is unshared, and the body refcount guards the shared
defaults. The bullet now states that model and points at
FunctionBodySwap::unshareStaticVariables() for the rules. The 8.4 branch's
wording stays as-is - it is correct for the 8.4 engine.

Also scoped docs/opcache-binary.md's "every payload shape of the 8.4 walker"
phrase to this line: the port covers the engine walker's shapes including the
PHP 8.5-only ones (attributed constants, closures in constant expressions).

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BDcCQiYqbMkjRPyhWgLL6M
@lisachenko
lisachenko marked this pull request as ready for review August 20, 2026 08:20
@lisachenko
lisachenko merged commit 22c97d7 into master Aug 20, 2026
21 checks passed
@lisachenko
lisachenko deleted the claude/opcache-85-docs-statics branch August 20, 2026 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants