Repository navigation
Redesign the php.net homepage - #2105
mattstauffer wants to merge 28 commits into
Conversation
# Conflicts: # public/index.php
|
📊 Regression report for commit dba96e0 is at https://web-php-regression-report-pr-2105.preview.thephp.foundation |
|
🚀 Preview for commit dba96e0 is available at https://web-php-pr-2105.preview.thephp.foundation |
TimWolla
left a comment
There was a problem hiding this comment.
The updated styles resulted in a horizontal scrollbar for the Duration example on the release page for me:
While doing the release page, I've carefully hardwrapped the code so it's not scrollable (and without introducing too many weird breaks). Can we get just a little bit of additional width there?
morrisonlevi
left a comment
There was a problem hiding this comment.
Small thing: can't find the source for it, but I think this:
Made for the web. From the beginning.
Should just be:
Made for the web from the beginning.
It's better grammar and not everything is doing the two-sentence thing already, no reason to shoe-horn it in, I think?
|
|
||
| <section id="history" data-release-history aria-labelledby="history-heading" class="history"> | ||
| <div class="container history__intro"> | ||
| <h2 id="history-heading" class="section-title section-title--small">PHP through the years.</h2> |
There was a problem hiding this comment.
This section is interesting, but it is not clear for a user that this has a horizontal scroll. I am also not in favor that this breaks beyond the container (by default). Perhaps we can utilise the outers of the container to indicate that a scroll here is possible?
| <ol role="list" aria-label="PHP release milestones" aria-describedby="history-help"> | ||
| <?php foreach ($history['releases'] as $i => $release): ?> | ||
| <li class="history__release" style="left: <?= $release['left'] ?>px"> | ||
| <a draggable="false" data-history-release<?php if ($release['url']): ?> href="<?= $release['url'] ?>"<?php endif; ?> title="<?= $release['title'] ?>" aria-label="<?= $release['title'] ?>"<?= $i === array_key_last($history['releases']) ? '' : ' tabindex="-1"' ?> class="history__mark<?= $release['major'] ? ' history__mark--major' : '' ?>"> |
There was a problem hiding this comment.
Perhaps a tooltip (e.g tippy.js) to give more information, than relying on title/aria-label to give it more of an active feel.
| */ | ||
| return [ | ||
| '1.0' => ['label' => 'PHP Tools 1.0', 'date' => '1995-06-08', 'url' => 'https://talks.php.net/hhs'], | ||
| '2.0' => ['label' => 'PHP/FI 2.0', 'date' => '1997-11-12', 'url' => 'https://talks.php.net/show/oscon2002/5'], |
There was a problem hiding this comment.
This link is very buggy. It keeps refreshing.
There was a problem hiding this comment.
Anyone know how to fix that page?
|
I like it. It looks a lot like TailwindUI's old components, but there's nothing inherently wrong with that. It's a big improvement. I might increase spacing above the "POWERED BY PHP" title and decrease spacing below it to visually balance the top and bottom padding of the section. |
|
If the goal of this redesign is to make the PHP homepage completely indistinguishable from every other AI slop website generated in 30 minutes from a single prompt, it's extremely effective 👍 |
One thing that makes this feel odd to me is that you can't see the scroll bar until you try to scroll it. In some cases (and on some devices) it's really obvious, but in others less so. I also have a horizontal scroll bar for just the 8.6 version of the polling api, even though the content is comfortably in the pane. |
|
The timeline at the bottom is a wonderful touch, great job! Everything else like it was left to AI. Why is that? PHP is one of the most influential and important programming languages in the world. We deserve a design that champions that legacy. Take a look at the website designs of Ruby, Go, and Rust. Every single one has personality while maintaining a cohesive design. This design is going to look outdated in the coming 6-12 months because it favors looks over relevant meaning:
In terms of accessibility, I can only speak for myself because I have astigmatism, but the contrast in the colors is pretty difficult on my eyes. The section that does it best is the "Built by people. Open by design." section. The purples are strong and differ enough from the background to establish a clear difference. The borders and lines on the page are too much. For someone with astigmatism, scrolling past the page leaves a blur or a spot similar to a car's windshield wiper. I understand this is the work of unpaid volunteers, so I'm very grateful for their time. If anything can be taken from this comment, please let it call attention to the contrast in colors throughout the site in light mode and the overuse of borders and lines in the page. Thank you very much once again. PHP deserves a wonderful website because of its role in the history of the web. Please let us know how we can help! |
|
The powered-by section is a little iffy. I would think an org is, in some sense, powered by PHP if a majority of the code that powers their website backend is written in PHP. I don't think it's sufficient to have a company blog powered by WordPress, as that would include most of the Fortune 500. If we applied the that rule to the list it would rule out NYTimes, Asana, Zillow and DHL (seems only the NL site uses Drupal). Etsy and Wikipedia are safely PHP, and Nasa.gov and Der Spiegel seem like a safe bet too. Unsure about the others. From the websites that went down due to the PHP outage, you could maybe add the BBC to the list, and also various government websites. |
| } | ||
| <span class="tok-comment tok-italic">// The archive is newest-first, so the year's first posts are at the end.</span> | ||
| <span class="tok-keyword">echo</span> <span class="tok-function">json_encode</span>(<span class="tok-function">array_slice</span>(<span class="tok-function">array_reverse</span>(<span class="tok-text">$headlines</span>), 0, 3), <span class="tok-type">JSON_PRETTY_PRINT</span>); |
There was a problem hiding this comment.
This line is a good showcase for PFA + pipe operator:
echo $headlines
|> array_reverse(?)
|> array_slice(?, 0, 3)
|> json_encode(?, JSON_PRETTY_PRINT);|
OK, I tried to bring together the constructive notes that were brought up here and in the internals mailing list into one list here. Obviously the list conversation will continue, as will comments here, but it feels like the comments have slowed down and this will give me a point to start from as I'm starting to process what are easy/obvious steps and which require more conversation with the Marketing group, the list, or others. As I mentioned before, our general practices have been: we listen to all constructive feedback; we apply our general goals and priorities and personas to them; and if those don't make a decision clear, it gets brought up to the marketing subgroup. I haven't done any responding or prioritizing in here yet, just gathering. I'll probably start off after this by grouping them into three categories:
OK, here's the list as it exists so far! Visual design and branding
Layout and section order
Copy and content
Powered by PHP section
Code examples
Navigation, header and community links
Accessibility and contrast
Mobile and the timeline
Bugs and broken items
Code review and implementationAll from @DanielEScherzer inline review.
Scope and process
What didn't make it onto this list
|
|
I would remove the second sentence ("It's a scripting language, too..."). It does not add much value. It dilutes the power of the strong first sentence. I say this someone who speaks to technical decision makers. When editing material for both business people and engineers, I have found that less can be more. |
|
This response has been extremely heartening; it means a lot to know how much feedback from the community is being taken into consideration. Thankyou all for your effort, it is much appreciated. 🙏 |
|
OK! i tried to group them as I mentioned in my previous comment. And when I have time this week I'll get started: A. Acting on the obvious ones Thanks again everyone!!!! 1. Actionable without any consideration, ready to go (or decide not to go!)Visual design and branding
Accessibility and contrast
Powered by PHP section
Navigation, header and community links
Code examples
Bugs and broken items
Code review and implementationAll from @DanielEScherzer inline review.
2. Likely actionable, needs to be looked into moreLayout and section order
Visual design and branding
Copy and content
Navigation, header and community links
Code examples
Timeline
Powered by PHP section
3. Needs conversation before a decision can be madeVisual design and branding
Copy and content
Powered by PHP section
Code examples
Navigation, header and community links
4. We won't act on, but it could be relevant laterWe won't act on these right now for reasons described below, but they may merit future work on the site that would enable this to happen.
5. We won't act onI believe I've handled each of these appropriately according to the goals and priorities of the work, but these are all just Matt Stauffer's responses; I will also ask the Marketing group to review all of these on our next call, and maybe even earlier in our Discord.
|
…r/packagist logos
|
I think giving the header a purple background would help bridge the old with the new We can't let perfect get in the way of better. |
|
When will the preview be updated? Can we already review the latest changes? |
I can't reproduce this in any browser. What's your browser/OS? |
|
@kevinpapst I have no idea! Maybe what @TimWolla did with the labels cause a re-build when we want one? |
Windows 10 / 11 + Chrome, clearly visible on Light Mode (tested on several machines). |



A new php.net homepage
Preview here: https://web-php-pr-2105.preview.thephp.foundation/
Discussion period: At least two weeks; no merge until at earliest December 4, 2026.
What is it?
This PR replaces the php.net homepage with a new design. It's the result of several months of open discussion in the PHP Ambassadors marketing group.
This PR's plans, priorities, and design have been evaluated and considered pretty extensively, but I'd especially love eyes on the code implementation, especially on these two areas:
Why now
The current php.net design launched in 2014 (2013, 2014). That's twelve years ago! PHP itself has changed enormously since then, but the front door to the language still looks the way it did before PHP 7 existed, and today the homepage is mostly a release log.
That matters because many developers still think of PHP the way it was a decade or two ago, and php.net is often the first place they check. In one of the Ambassadors group meetings, this line stuck with me:
php.net isn't the only place that work happens, but it's the one place every PHP developer--and, more importantly when convincing people PHP is viable--every curious/concerned newcomer will eventually land. Our homepage should show the language as it is today.
How we got here
This was all done in the open, and anyone has been welcome (and invited!) to join in at any point.
We're making it as a PR because the history of previous redesigns on PHP.net have been like this: a group of people openly plan a redesign, they present it for review, and then they merge it in.
Why a PR and not an RFC?
PHP's RFC process is for changes to the language, and php.net's past redesigns haven't gone through it. They followed the path this one has: a group plans the redesign in the open, presents it for review, and merges it once the feedback has been worked through. Derick helped make sure we followed that precedent here. This PR and its two-week discussion period are the review step, so this is the place to push back on any of it.
Who it's for
The goal we agreed on:
In priority order, the audiences are:
Putting existing developers third was deliberate. We're the audience that already knows our way around php.net and is most willing to take an extra click to get somewhere. Newcomers and decision-makers often get one look before deciding PHP isn't worth their time.
In practice, the extra click is small. The hero still has "Download PHP" and a "Latest releases" panel with every supported version and its changelog and upgrade links, plus the latest news. The footer keeps the utility links. And if you really just want the old homepage, it's still there at /classic/. It's hidden from search engines but available to anyone who wants it.
The design
This isn't a net-new visual identity. We deliberately built it as a continuation of what already exists:
The homepage is made up of these sections:
Out of scope for now
A few things came up that we decided to leave for later PRs, so they get their own conversations:
Feedback I'm looking for
Code examples
This is the place where I'd most love help. The examples live in
include/homepage/examples.php. Right now there are five:UserController.php: a JSON endpoint using attributes, typed properties, and constructor injectionGreetCommand.php: a CLI command defined with attributesrelease_date.php: coding against PSR interfaces with a pluggable HTTP clientstream_large_dataset.php: generators walking a file larger than memoryextract_headlines.php: fetching a page and querying it with the built-in DOM parser and CSS selectorsThe question is: what would be most compelling and helpful to someone who's new to PHP, or who hasn't looked at it in years? Suggestions for replacements or additions are very welcome. Good examples are short, show off something modern about the language, and have realistic output in the terminal panel.
Implementation
Of course, I did the best I could to match this to A) the existing code style of the site, B) the future-facing code style its phpstan/etc. guidelines expect, and C) a framework-agnostic view of what modern PHP/CSS/JS looks like today. But I'm only one person and I'd love any help necessary to make sure this fits well with the current and future php.net code.
What's in the code
public/index.php, with data and helpers ininclude/homepage.incandinclude/homepage/*.php(examples, release highlights, logos, timeline overrides)src/Homepage/, each with unit tests:FeaturedRelease: picks the newest released branch for the "Meet PHP x.y" card, so highlights for an upcoming release can be added before release dayReleaseHistory: builds the "PHP through the years" timelinePackagistStats: reads Packagist totals from a JSON file written by the backend update script, with fallback values if the file is missingbase.css,components.css,homepage.css,search-modal.css, andrelease-page.css.php85.cssbecamerelease-page.css, and the release pages now share components with the homepage.theme-medium.cssis no longer used by these pages.homepage.js(tabs, releases panel, timeline),site-header.js(theme switcher, search, mobile menu, language switcher),copy-code.js, andkeyboard.js(a jQuery-free version of the keyboard easter eggs)public/fonts/include/header.inc,include/layout.inc,include/site-header.inc, andinclude/footer.incpublic/classic/index.php, sendingX-Robots-Tag: noindexLogo wall sources
Every logo needs a public, reputable connection to PHP. Here's what each one is based on. A couple of logos from earlier drafts were removed because we couldn't find a public source.
Timeline
Comments are open for at minimum two weeks, until December 4, 2026. I'll keep updating the branch as feedback comes in. After that, unless something significant comes up, I hope for us to make the decision to merge; if further discussions is required at that point, of course we can keep it moving!
Thank you
Thanks to Jack McDade for the design, to Derick Rethans for sharing the history of designs and helping guide the process to be in line with how work has historically proceeded on php.net, to Mark Randall for the groundwork in #1962, to Roman Pronskiy and Nuno Guerra for the 8.x release page design for showing what php.net could look like, and to everyone who came to the marketing meetings, left notes, or commented on #1962.