Update screens for output that changed with PHP itself - #5720
Open
KentarouTakeda wants to merge 6 commits into
Open
Update screens for output that changed with PHP itself#5720KentarouTakeda wants to merge 6 commits into
KentarouTakeda wants to merge 6 commits into
Conversation
Since PHP 8.0 "+" and "-" bind tighter than ".", so the concatenation example no longer prints -1. Its comments were written for the old grouping and stayed behind; the example below it, kept non-interactive, carries that history. Since PHP 7.3 a constant is allowed on the left of instanceof and evaluates to false instead of raising a fatal error; the prose above that example already says so.
Reading a missing array key is a warning rather than a notice since PHP 8.0, so the sentence introducing that example moves with the screen. Since PHP 8.2 the ValueError from BackedEnum::from() no longer quotes the enum name.
Both pages used array_merge() to show that reflection reports no return type for internal functions. Since PHP 8.0 it does report one, so the examples demonstrated nothing and the paragraph warning about built-ins was no longer true. A method with a tentative return type is the case that still reports none, so the examples use one and point at the accessors that return it.
The dump of Exception has drifted across several releases rather than one: property types and defaults are printed differently, tentative return types appeared, and the method count was stale. Regenerated from PHP 8.5 instead of reconstructed.
Since PHP 8.0 an anonymous class is named after the class it extends. The note further down that page still showed the PHP 7 form, captured on 3v4l.org rather than from the example; the NUL byte the name contains is invisible in a screen, so the note now says so. Since PHP 8.2 var_export() writes class names fully qualified, with a leading backslash.
Non-strict detection follows the documented rule since PHP 8.3, so this string now yields ASCII rather than UTF-8. The comment goes with it: it named UTF-8 as the closer match, and the two candidates are in fact equally distant here, so it should not name a winner at all.
KentarouTakeda
force-pushed
the
fix-screen-behaviour-changes
branch
from
July 28, 2026 12:49
086ead5 to
c043d6b
Compare
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.
Follow-up to #5718, from the same audit: the examples where PHP's own behaviour moved and the
<screen>was never updated. One commit per kind of change.+/-vs.precedence (8.0), constants left ofinstanceof(7.3)BackedEnum::from()ValueError no longer quotes the enum name (8.2)var_export()leading backslash (8.2)mb_detect_encoding()non-strict detection (8.3)ReflectionClass::__toString()regenerated rather than attributed to one change; theExceptiondump has drifted across several releasesWhere a corrected screen would leave the page contradicting itself, the prose or comment moves with it: the
foreach"notice" sentence, two comments in the precedence example, themb_detect_encoding()comment, and the anonymous class note. The two reflection examples needed replacing outright — they usedarray_merge()to show that internals report no return type, which it now does, so a method with a tentative return type takes its place.Pages to check with Run code
Press Run code and the output that appears is what this PR puts in the
<screen>. The static one still on these pages is the "before" side of the diff, until the manual is rebuilt.