Skip to content

[WIP] PHP 8.6 release page - #2030

Draft
saundefined wants to merge 10 commits into
php:masterfrom
saundefined:php86
Draft

saundefined wants to merge 10 commits into
php:masterfrom
saundefined:php86

Conversation

@saundefined

@saundefined saundefined commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

@github-actions

github-actions Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

📊 Regression report for commit 7b98f5c is at https://web-php-regression-report-pr-2030.preview.thephp.foundation

@github-actions

github-actions Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

🚀 Preview for commit 7b98f5c is available at https://web-php-pr-2030.preview.thephp.foundation

Comment thread public/releases/8.6/release.inc Resolved
Comment thread public/releases/8.6/release.inc Resolved
Comment thread public/releases/8.6/release.inc Resolved
Comment thread public/releases/8.6/release.inc Resolved
Comment thread public/releases/8.6/release.inc Resolved
Co-authored-by: Tim Düsterhus <tim@bastelstu.be>
Comment thread public/releases/8.6/release.inc Resolved
Comment thread public/releases/8.6/release.inc Resolved
Comment thread public/releases/8.6/release.inc Resolved
Comment thread public/releases/8.6/release.inc Resolved
Comment thread public/releases/8.6/release.inc Resolved
Comment thread public/releases/8.6/release.inc Resolved
Comment thread public/releases/8.6/release.inc Outdated
Comment on lines +54 to +67
new FeatureComparison(
id: 'duration-class',
title: message('duration_title', $lang),
description: message('duration_description', $lang),
links: [
'RFC|https://wiki.php.net/rfc/duration_class',
],
before: <<<'PHP'
// TODO
PHP,
after: <<<'PHP'
// TODO
PHP,
),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For Duration perhaps a custom wrapper around time_nanosleep()? The class nicely maps directly onto the parameters of time_nanosleep().

And then perhaps showcase some of the mathematical operations, e.g. the delay example from the RFC: https://wiki.php.net/rfc/duration_class#examples

Comment thread public/releases/8.6/languages/en.php Resolved
Comment thread public/releases/8.6/languages/en.php Resolved
'documentation' => 'Doc',
'released' => 'Released Nov 19, 2026',
'key_features' => 'Key Features in PHP 8.6',
'key_features_description' => '<p><strong>Faster</strong>, <strong>cleaner</strong>, and <strong>built for developers</strong>.</p>',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we avoid putting the <p> tags in the message contents, if the entire message is a single paragraph? Just wrap the actual usage in the tags, to make translating easier

'key_features' => 'Key Features in PHP 8.6',
'key_features_description' => '<p><strong>Faster</strong>, <strong>cleaner</strong>, and <strong>built for developers</strong>.</p>',

'features_pfa_description' => '<p>Allows functions to be called with only a subset of the required parameters, deferring the passing of the remaining ones to a later time.</p>',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this description is wrong - functions are not called with a subset of the required parameters, rather a subset of parameters is specified and the call is delayed until the remaining ones are provided

'features_sort_direction_description' => '<p>Represents a sort directions.</p>',

'pfa_title' => 'Partial Function Application',
'pfa_description' => 'Allows functions to be called with only a subset of the required parameters, deferring the passing of the remaining ones to a later time.',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any expected difference between this and features_pfa_description? Same with some of the other description messages - if they are expected to be the same, just reuse the original one?

Not repeating my comments on the various features_* and other messages

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’ve separated these into two different language keys, because the features_* descriptions might be simplified or condensed, whereas the main descriptions might require more detail.

If the wording ends up being the same, we can always merge them.

Comment thread public/releases/8.6/languages/en.php Resolved
Comment thread public/releases/8.6/languages/en.php Resolved
}

\site_header("PHP 8.6 Release Announcement", [
'current' => 'php85',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these meant to say 8.5 for current and for the css ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

css — includes the necessary files,
current — adds a css class to the current page

TimWolla

This comment was marked as resolved.

Comment thread public/releases/8.6/release.inc Resolved
saundefined and others added 3 commits November 7, 2026 12:51
Co-authored-by: Tim Düsterhus <timwolla@googlemail.com>
Co-authored-by: Daniel Scherzer <daniel.e.scherzer@gmail.com>
Co-authored-by: Theodore Brown <theodorejb@outlook.com>
@saundefined

Copy link
Copy Markdown
Member Author

Rendering on mobile is broken:

@TimWolla should be fixed

Comment thread public/releases/8.6/release.inc Resolved
Comment thread public/releases/8.6/languages/en.php Resolved
Comment thread public/releases/8.6/languages/en.php Resolved
Comment thread public/releases/8.6/release.inc Resolved
Comment on lines +75 to +82
$durations = [
$oneSecond,
$negativeHour,
$onePointFiveSeconds,
$halfSecond,
];
usort($durations, Duration::compare(...)); // Will sort to [-1h, 0.5s, 1s, 1.5s]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this is worth showing on the release page.

Comment on lines +103 to +130
new FeatureComparison(
id: 'clamp-function',
title: message('clamp_title', $lang),
description: message('clamp_description', $lang),
links: [
'RFC|https://wiki.php.net/rfc/clamp_v2',
],
before: <<<'PHP'
var_dump(max(0, min(-10, 100)));
// int(0)
var_dump(max(0, min(50, 100)));
// int(50)
var_dump(max(0, min(110, 100)));
// int(100)
PHP,
after: <<<'PHP'
var_dump(clamp(-10, 0, 100));
// int(0)
var_dump(clamp(50, 0, 100));
// int(50)
var_dump(clamp(110, 0, 100));
// int(100)
PHP,
),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description says:

numeric or otherwise

Perhaps it makes sense to include one example using Duration? This would nicely interconnect the new features.

Comment thread public/releases/8.6/release.inc Resolved
saundefined and others added 2 commits November 8, 2026 20:39
Co-authored-by: Tim Düsterhus <timwolla@googlemail.com>
@TimWolla

This comment was marked as resolved.

Add missing examples and descriptions for the Polling API, readonly property defaults, stream error handling, parameter DocComments, and isReadable()/isWritable(). Rewrite the additional features and deprecations sections to focus on the most important changes instead of long lists of function names.

Also fixed a couple PHPStan errors in the common.php file.
* @param string $query Terms to search
* @param int $limit Maximum number of results
*/
function search(string $query, int $limit = 10): array {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
function search(string $query, int $limit = 10): array {
function search(string $query, int $limit = 10): array
{

if ($stream === $server) {
$client = stream_socket_accept($server);
$poll->add(new StreamPollHandle($client), [Event::Read]);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$poll->add(new StreamPollHandle($client), [Event::Read]);
$poll->add(
new StreamPollHandle($client),
[Event::Read],
);

$read = [$server, ...$clients];
$write = $except = null;
// Based on select(), which typically can't handle more than 1024 connections

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Based on select(), which typically can't handle more than 1024 connections
// Based on select(), which typically can't handle
// more than 1024 connections

$data = fread($stream, 8192);
if ($data === '' || $data === false) {
unset($clients[array_search($stream, $clients, true)]);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
unset($clients[array_search($stream, $clients, true)]);
$key = array_search($stream, $clients, true);
unset($clients[$key]);

]);
try {
$config = file_get_contents('/etc/app/config.json', context: $context);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$config = file_get_contents('/etc/app/config.json', context: $context);
$config = file_get_contents(
'/etc/app/config.json',
context: $context,
);

} catch (StreamException $e) {
foreach ($e->getErrors() as $error) {
// $error->code is a StreamErrorCode enum case
log_error($error->code->name, $error->message, $error->wrapperName);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
log_error($error->code->name, $error->message, $error->wrapperName);
log_error(
$error->code->name,
$error->message,
$error->wrapperName,
);

}
var_dump(
new ReflectionParameter([DB::class, 'search'], 'query')->getDocComment()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
new ReflectionParameter([DB::class, 'search'], 'query')->getDocComment()
new ReflectionParameter([DB::class, 'search'], 'query')
->getDocComment(),

"%s: isReadable=%s isWritable=%s\n",
$item,
$property->isReadable(null, $entry) ? 'yes' : 'no',
$property->isWritable(null, $entry) ? 'yes' : 'no'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$property->isWritable(null, $entry) ? 'yes' : 'no'
$property->isWritable(null, $entry) ? 'yes' : 'no',

/**
* Returns up to $limit items matching the $query.
*/
function search(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
function search(
public function search(

* @param string $query Terms to search
* @param int $limit Maximum number of results
*/
function search(string $query, int $limit = 10): array {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
function search(string $query, int $limit = 10): array {
public function search(string $query, int $limit = 10): array {

title: message('duration_title', $lang),
description: message('duration_description', $lang),
links: [
'RFC|https://wiki.php.net/rfc/duration_class',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duration already has documentation: https://www.php.net/manual/en/class.time-duration.php

title: message('clamp_title', $lang),
description: message('clamp_description', $lang),
links: [
'RFC|https://wiki.php.net/rfc/clamp_v2',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants