docs(opcache): align hot-swap statics wording with the PHP 8.5 ownership model - #274
Merged
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
masteronly (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 viazend_array_dup). On PHP 8.5 no donor kind owns the defaults table (zend_create_closure_exduplicates into the map slot only): only the liveZEND_MAP_PTRslot is unshared and the body refcount guards the shared defaults. The bullet now states that model and points atFunctionBodySwap::unshareStaticVariables(). The8.4branch'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/hasLocalVariabledocs, and the inheritance-cache decline row.Environment it was verified on
--enable-debug)? noChecklist
masteronly — the corrected wording is PHP 8.5-specific; 8.4's text is right for 8.4composer testunaffected (no code changed)composer cs:checkgreen; PHPStan unaffected🤖 Generated with Claude Code
https://claude.ai/code/session_01BDcCQiYqbMkjRPyhWgLL6M
Generated by Claude Code