Skip to content

Fix screens that never matched their example - #5721

Open
KentarouTakeda wants to merge 4 commits into
php:masterfrom
KentarouTakeda:fix-screens-that-never-matched
Open

Fix screens that never matched their example#5721
KentarouTakeda wants to merge 4 commits into
php:masterfrom
KentarouTakeda:fix-screens-that-never-matched

Conversation

@KentarouTakeda

@KentarouTakeda KentarouTakeda commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Third batch from the audit behind #5718: screens that match no PHP version, having been captured with other ini settings, written by hand, or written against an extension new in 8.5.

  • Uri\WhatWg\Url::getPort() and withPort() echoed a port that normalization removes, so both printed nothing while their screens claimed 443. They use var_dump() now and also show a port that is kept. Url::parse() normalizes an empty path to /.
  • DateTimeZone::__construct(): the bracketed docref belongs to the html_errors output format and no combination of html_errors and docref_root reproduces it on 8.5.
  • PcgOneseq128XslRr64::jump(): seed 42659 emits a156c0086dd79d44 second and 1e9f3107d56653d0 third, so jump(2) cannot produce the documented value — with it both engines would agree, the opposite of the point being made.
  • date_sun_info() formatted timestamps with date(), so its output followed the reader's timezone; the coordinates are Jerusalem, so it is now set to that zone.
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.

---

P.S. — after the review on #5718, every example in this PR was re-run on 8.2, 8.3, 8.4 and 8.5 rather than trusted to Run code, which is one wasm build of one version.

One thing that turned up and is deliberately left alone: date_sun_info() reports a slightly different sunrise and sunset on 8.2 than on 8.3+, because 8.3.22 fixed a regression. That is the same reasoning you applied to the Length of day screen on this page in #5718, so this screen keeps the current, correct values rather than being split.

The Uri\WhatWg\Url pages are 8.5-only by construction, so a single screen is right there. Everything else agrees across 8.2–8.5.

@KentarouTakeda
KentarouTakeda requested a review from TimWolla as a code owner July 28, 2026 12:43
A WHATWG URL does not store the port when it is the scheme's default, so
getPort() and withPort() both echoed null while their screens claimed
443, and Url::parse() normalizes an empty path to "/", which its screen
did not show. The extension is new in PHP 8.5, so these were wrong from
the start.

Echoing null renders as an empty box, so the two port examples use
var_dump() now and also show a port that is kept: the contrast is what
makes the normalization legible.
The bracketed link belongs to the html_errors output format rather than
to the message the example prints, and no combination of html_errors and
docref_root reproduces it on PHP 8.5. The screen was captured in a
browser, where that reference is rendered as a link.
PcgOneseq128XslRr64 seeded with 42659 emits a156c0086dd79d44 second and
1e9f3107d56653d0 third, so jump(2) cannot produce the documented value.
With that output both engines would agree, which is the opposite of what
the example is there to show.
The example formats timestamps with date(), so its output followed the
timezone of whoever ran it and could not be pinned down: the recorded
values match no timezone on any PHP version I could test. The
coordinates are Jerusalem, so the times are reported in that zone, as
the polar night example below already does for Prudhoe Bay.
@KentarouTakeda
KentarouTakeda force-pushed the fix-screens-that-never-matched branch from ff40a1a to f578447 Compare July 31, 2026 18:16
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.

1 participant