[web-php] master: Preview PHP 8.6 release page (#2030)
| From: | Sergey Panteleev via GitHub | Date: | Tue, 17 Nov 2026 15:58:16 +0000 |
| Subject: | [web-php] master: Preview PHP 8.6 release page (#2030) | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-34195@lists.php.net to get a copy of this message | ||
Author: Sergey Panteleev (saundefined)
Committer: GitHub (web-flow)
Pusher: saundefined
Date: 2026-11-17T18:58:07+03:00
Commit: https://github.com/php/web-php/commit/724989d80c2354fe30353f968223e6b66b531185
Raw diff: https://github.com/php/web-php/commit/724989d80c2354fe30353f968223e6b66b531185.diff
Preview PHP 8.6 release page (#2030)
PHP 8.6 has not been released yet.
Co-authored-by: Tim Düsterhus <tim@bastelstu..be>
Co-authored-by: Daniel Scherzer <daniel.e.scherzer@gmail.com>
Co-authored-by: Theodore Brown <theodorejb@outlook.com>
Changed paths:
A public/images/php8/logo_php8_6.svg
A public/images/php8/php_8_6_released.png
A public/releases/8.6/common.php
A public/releases/8.6/en.php
A public/releases/8.6/index.php
A public/releases/8.6/languages/en.php
A public/releases/8.6/languages/ru.php
A public/releases/8.6/release.inc
A public/releases/8.6/ru.php
M public/styles/php85.css
M src/Themes/ReleasePage.php
Diff:
diff --git a/public/images/php8/logo_php8_6.svg b/public/images/php8/logo_php8_6.svg
new file mode 100644
index 0000000000..cab6a6b6fe
--- /dev/null
+++ b/public/images/php8/logo_php8_6.svg
@@ -0,0 +1,9 @@
+<svg width="484" height="138" viewBox="0 0 484 138"
fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M21.7836
130.5H0L19.3978 30.4113H61.2017C73.7532 30.4113 82.9853 33.7441 88.6905 40.3056C94.4995 46.9713
96.1592 56.1365 93.8771 68.1139C92.9435 73.009 91.2838 77.4875 89.1055 81.5494C86.8234 85.6113
83.9189 89.3607 80.2883 92.6935C75.9316 96.7554 71.1599 99.6716 65.8696 101.442C60.5793 103.213
53.8367 104.046 45.5382 104.046H26.8665L21.7836 130.5ZM69.3965 50.7207C66.5957 47.7003 61.0979
46.138 52.9031 46.138H38.0695L29.9784 88.1109H43.1524C51.8658 88.1109 58.4009 86.4445 62.7576
83.1116C67.0106 79.7788 69.9151 74.2588 71.4711 66.5516C72.8196 59.0528 72.0935 53.8452 69.3965
50.7207Z" fill="white"/>
+<path d="M109.748 3.74902H131.324L126.138 30.4117H145.328C157.465 30.4117 165.763 32.4947
170.328 36.7649C174.892 41.035 176.344 47.909 174.477 57.3867L165.452 104.047H143.565L152.174
59.6781C153.108 54.6788 152.797 51.2418 151.137 49.3671C149.477 47.4924 145.847 46.6592 140.349
46..6592H123.13L112.03 104.047H90.3508L109.748 3.74902Z" fill="white"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M191.281
130.5H169.498L188.895 30.4113H230.803C243.354 30.4113 252.587 33.7441 258.292 40.3056C264.101
46.9713 265.761 56.1365 263.478 68.1139C262.545 73.009 260.885 77.4875 258.707 81.5494C256.425
85.6113 253.52 89.3607 249.89 92.6935C245.533 96..7554 240.761 99.6716 235.471 101.442C230.181
103.213 223.438 104.046 215.139 104.046H196.468L191.281 130.5ZM238.998 50.7207C236.197 47.7003
230.699 46.138 222.504 46.138H207.567L199.476 88.1109H212.65C221.363 88.1109 227.898 86.4445 232.255
83.1116C236.508 79.7788 239.413 74.2588 240.969 66.5516C242.317 59.0528 241.695 53.8452 238.998
50.7207Z" fill="white"/>
+<path d="M328.518 49.9925C322.606 35.8279 317.627 23.5381 322.502 14.9977C324.369 12.394
326.444 11.04 328.726 11.04C333.394 11.04 337.647 16.1434 337.647 16.1434L343.559 23.3298L339.825
14.7894C339.618 14.477 333.29 0 321.983 0C318.041 0 313.892 1.77057 309.847 5.3117L309.743
5.41585C299.888 16.8725 309..535 38.5358 318.145 57.5955L324.473 72.3849C327.377 79.9879 330.282
89.0491 328.518 95.7147C325.821 106.13 316.589 113.212 316.485 113.316L310.573 117.899L317.73
115.608C318.456 115.399 334.327 110.192 338.165 96.3396C340.551 84.9872 337.543 73.6347 334.535
64.886C334.95 64.5736 334.12 65.1985 334.535 64.886L329.037 50.6174"
fill="white"/>
+<path d="M346.049 9.78979L338.684 1.66602L343.974 11.352C344.078 11.4562 350.509 23.5377
342.315 37.5981C339.306 41.9724 334.638 46.3468 328.726 50.7211L318.041 57.6992C317.938 57.5951
317.938 57.4909 318.041 57.6992L317.626 58.0117C305.697 64.8856 294.598 69.0517 294.391
69.1558C277.897 76.5505 267.524 88.0071 266.072 100.714C264.931 110.296 269.391 119.669 278.105
126.231L278.208 126.335C283.706 129.668 289.619 131.334 295.843 131.334C312.129 131.334 324.888
119.982 325.406 119.461L333.394 112.275L323.954 117.274C323.85 117.274 315.967 121.44 307.772
121.44C300.407 121.44 295.22 118.211 292.108 111.65C288.167 97.6932 301.963 88.1113 317.834
77.0713C319.909 75.6132 322.087 74.0509 324.265 72.5928L324.369 72.4887L333.809 65.4064C333.912
65.1981 334.223 64.9898 334.223 64.9898C342.003 58.5324 352.273 48.4298 354.659 34.2653C356.526
21.4547 346.464 10.3105 346.049 9.78979Z" fill="#0F0F0F"/>
+<path d="M357.459 85.9246H377.687L374.057 104.359H353.829L357.459 85.9246Z"
fill="white"/>
+<path d="M446.184 52.0094C450.839 52.0959 454.976 52.6146 458.596 53..5658C462.303 54.5169
465.492 55.9868 468.164 57.9756C470.75 59.8778 472.258 62.688 472.689 66.406C473.206 70.124 472.603
74.7068 470.879 80.1541C469.327 84.9098 467.129 88.9737 464.285 92.3459C461.441 95.6316 457.95
98.2688 453.812 100.258C449.675 102.16 445.495 103.673 441.271 104.797C437.048 105.835 432.781
106.483 428.471 106.742C426.834 106.915 425.196 107.002 423.558 107.002C421.921 107.002 420.283
106.915 418.645 106.742C417.007 106.656 415.456 106.526 413.991 106.353C412.525 106.18 411.103
106.008 409.724 105.835C403.001 104.883 397.7 102.938 393.821 99.9981C389.943 96.9718 387.486
92.9944 386.452 88.0658C385.504 83.1372 385.331 77.8195 385.934 72.1128C386.538 66.3195 387.96
60.1804 390.201 53.6955C392.873 46 396.148 39.515 400.027 34.2406C403.906 28.8797 408.388 24.7293
413.474 21.7895C418.559 18.7631 424..205 16.515 430.411 15.0451C436.617 13.5752 443.34 12.8402
450.58 12.8402L483.679 12.7105L479.412 28.6635H445.796C441.314 28.75 437.306 29.2255 433.772
30.0902C430.324 30.8684 427.351 32.0789 424.851 33.7218C422.438 35.3646 420.197 37.7425 418.128
40.8552C416.146 43.8816 414.422 47.6428 412.956 52.1391L446.184 52.0094ZM440.754
67.9624H408.819C408.733 68.2218 408.647 68.4812 408.56 68.7406C408.56 69 408.517 69.2162 408.431
69.3891C408.431 69.4756 408.388 69.6053 408.302 69.7782C408.302 69.8647 408.302 69.9511 408.302
70.0376C408.302 70.2105 408.259 70.3402 408.173 70.4267C408.173 70.5131 408.173 70.5996 408.173
70.6861C407.828 72.4154 407.612 74.1447 407.526 75.8741C407.526 77.5169 407.569 79.1165 407.655
80.6729C407.828 82.3158 408.345 83.7425 409.207 84.953C410.069 86.1635 411.189 87.2444 412.568
88.1955C413.43 88.7143 414.335 89.1898 415.284 89.6222C416.318 90.0545 417.438 90.4004 418.645
90.6598C419.852 90.9192 421.059 91.1353 422.265 91.3083C423.472 91.4812 424.722 91.5677 426.015
91.5677C427.135 91.6541 428.256 91.6541 429.376 91..5677C430.497 91.4812 431.617 91.3947 432.738
91.3083C433.083 91.2218 433.427 91.1786 433.772 91.1786C434.117 91.0921 434.462 91.0489 434.807
91.0489C435.496 90.8759 436.186 90.703 436.875 90.5301C437.651 90.3571 438.341 90.1842 438.944
90.0113C440.237 89.6654 441.4 89.1466 442.435 88.4549C443.555 87.7631 444.59 86.8985 445.538
85.8609C446.486 84.8233 447.262 83.7425 447.865 82.6184C448.555 81.4944 449.029 80.3703 449.287
79.2462C449.718 77.8628 449.891 76.5225 449.804 75.2256C449.718 73.9286 449.373 72.718 448.77
71.594C448.167 70.3834 447.175 69.5188 445.796 69C444.417 68.3947 442.693 68.0921 440.625
68.0921L440.754 67.9624Z" fill="white"/>
+</svg>
diff --git a/public/images/php8/php_8_6_released.png b/public/images/php8/php_8_6_released.png
new file mode 100644
index 0000000000..fe141d4be4
Binary files /dev/null and b/public/images/php8/php_8_6_released.png differ
diff --git a/public/releases/8.6/common.php b/public/releases/8.6/common.php
new file mode 100644
index 0000000000..c54f4c8f58
--- /dev/null
+++ b/public/releases/8.6/common.php
@@ -0,0 +1,67 @@
+<?php
+
+declare(strict_types=1);
+
+namespace releases\php86;
+
+require_once __DIR__ . '/../../../include/prepend.inc';
+
+const LANGUAGES = [
+ 'en' => 'English',
+ 'ru' => 'Русский',
+];
+
+function common_header(string $description): void {
+ global $MYSITE, $lang;
+
+ $meta_image_url = \filter_var($MYSITE . 'images/php8/php_8_6_released.png',
\FILTER_VALIDATE_URL);
+ $meta_image_path = $meta_image_url === false ? '' :
\htmlspecialchars($meta_image_url);
+ $meta_description = \htmlspecialchars($description);
+
+ $languages = [];
+ foreach (LANGUAGES as $code => $text) {
+ $languages[] = ['name' => $text, 'selected' => $lang === $code,
'url' => '/releases/8.6/' . $code . '.php'];
+ }
+
+ \site_header("PHP 8.6 Release Announcement", [
+ 'current' => 'php85',
+ 'css' => ['php85.css'],
+ 'language_switcher' => $languages,
+ 'theme_switcher' => true,
+ 'cache_control' => 60 * 60, // 1 hour
+ 'meta_tags' => <<<META
+<meta name="twitter:card" content="summary_large_image" />
+<meta name="twitter:site" content="@official_php" />
+<meta name="twitter:title" content="PHP 8.6 Released" />
+<meta name="twitter:description" content="{$meta_description}" />
+<meta name="twitter:creator" content="@official_php" />
+<meta name="twitter:image:src" content="{$meta_image_path}" />
+
+<meta itemprop="name" content="PHP 8.6 Released" />
+<meta itemprop="description" content="{$meta_description}" />
+<meta itemprop="image" content="{$meta_image_path}" />
+
+<meta property="og:image" content="{$meta_image_path}" />
+<meta property="og:description" content="{$meta_description}" />
+META
+ ]);
+}
+
+/**
+ * @param array<int|string, string> $interpolations
+ */
+function message(string $code, string $language = 'en', array $interpolations = []):
string
+{
+ $original = require __DIR__ . '/languages/en.php';
+ if (($language !== 'en') && file_exists(__DIR__ . '/languages/' .
$language . '.php')) {
+ $translation = require __DIR__ . '/languages/' . $language . '.php';
+ }
+
+ $message = $translation[$code] ?? $original[$code] ?? $code;
+
+ foreach ($interpolations as $name => $value) {
+ $message = str_replace("{{$name}}", $value, $message);
+ }
+
+ return $message;
+}
diff --git a/public/releases/8.6/en.php b/public/releases/8.6/en.php
new file mode 100644
index 0000000000..569ea7b5d0
--- /dev/null
+++ b/public/releases/8.6/en.php
@@ -0,0 +1,5 @@
+<?php
+
+$lang = 'en';
+
+require_once __DIR__ . '/release.inc';
diff --git a/public/releases/8.6/index.php b/public/releases/8.6/index.php
new file mode 100644
index 0000000000..19d100ec1b
--- /dev/null
+++ b/public/releases/8.6/index.php
@@ -0,0 +1,13 @@
+<?php
+
+use phpweb\LangChooser;
+use const releases\php86\LANGUAGES;
+
+$_SERVER['BASE_PAGE'] = 'releases/8.6/index.php';
+require_once __DIR__ . '/common.php';
+require_once __DIR__ . '/../../../src/autoload.php';
+
+$langChooser = new LangChooser(LANGUAGES, [], "", "");
+[$lang,] = $langChooser->chooseCode("", "",
$_SERVER['HTTP_ACCEPT_LANGUAGE']);
+
+mirror_redirect("/releases/8.6/$lang.php");
diff --git a/public/releases/8.6/languages/en.php b/public/releases/8.6/languages/en.php
new file mode 100644
index 0000000000..000fb68ecb
--- /dev/null
+++ b/public/releases/8.6/languages/en.php
@@ -0,0 +1,79 @@
+<?php
+
+return [
+ 'common_header' => 'PHP 8.6 is a major update of the PHP language, with new
features including Partial Function Application, a new Duration class, a Polling API, and a new
clamp() function',
+ 'main_title' => 'Smarter, Faster, Built for Tomorrow.',
+ 'main_subtitle' => '<p xmlns="http://www.w3.org/1999/html"><strong>PHP
8.6 is a major update of the PHP language</strong>, with new features including
<strong>Partial Function Application</strong>, a new
<strong>Duration</strong> class, a <strong>Polling API</strong>, and a new
<strong>clamp()</strong> function</p>',
+
+ 'whats_new' => 'What\'s new in 8.6',
+ 'upgrade_now' => 'Upgrade to PHP 8.6',
+ 'old_version' => 'PHP 8.5 and older',
+ 'badge_new' => 'NEW',
+ 'documentation' => 'Doc',
+ 'released' => 'Will be released on November 19, 2026',
+ 'release_unavailable_reason' => 'PHP 8..6 has not been released yet. It will
be released on November 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>',
+
+ 'features_pfa_description' => '<p>Allows some of a function\'s
arguments to be provided in advance, returning a Closure that accepts the rest.</p>',
+ 'features_readonly_property_defaults_description' => '<p>Allows
readonly properties to declare default values, so fixed values no longer have to be assigned in the
constructor.</p>',
+ 'features_polling_api_description' => '<p>Scalable I/O multiplexing
using epoll, kqueue, and other native mechanisms, available to event loop libraries like ReactPHP
and AMPHP.</p>',
+ 'features_clamp_description' => '<p>Ensures that a given value (numeric
or otherwise) falls within a specified range.</p>',
+ 'features_duration_description' => '<p>The Duration class represents
elapsed time as measured by a stopwatch.</p>',
+ 'features_sort_direction_description' => '<p>A standard, type-safe way
to express sort order that can be shared across libraries.</p>',
+
+ 'pfa_title' => 'Partial Function Application',
+ 'pfa_description' => 'Allows some of a function\'s arguments to be
provided in advance, using <code>?</code> and <code>...</code> placeholders
for the rest. The result is a Closure, and the function is only called once the remaining arguments
are passed to it.',
+ 'readonly_property_defaults_title' => 'Readonly property defaults',
+ 'readonly_property_defaults_description' => 'Instance readonly properties,
including those in readonly classes, can now declare a default value. This makes it simple to
implement get-only interface properties with fixed values, which previously required assigning them
in a constructor. The default counts as the property\'s initialization, so the constructor
cannot overwrite it.',
+ 'polling_api_title' => 'Polling API',
+ 'polling_api_description' => 'The new <code>Io\Poll</code> API
efficiently monitors many streams at once using the best mechanism available on each platform
(epoll, kqueue, event ports, or WSAPoll), without the scalability limits of
<code>stream_select()</code>. It is designed as a common foundation that event loop
libraries such as ReactPHP and AMPHP can build on.',
+ 'clamp_title' => 'New <code>clamp()</code> function',
+ 'clamp_description' => 'Ensures that a given value (numeric or otherwise)
falls within a specified range.. Otherwise, the nearest boundary value is returned.',
+ 'duration_title' => 'New <code>\Time\Duration</code> class',
+ 'duration_description' => 'The Duration class represents elapsed time as
measured by a stopwatch. Its representation is independent of any time and timezone and allows to
represent a range of more than 250 years with nanosecond precision. This makes it well-suited to
represent timeouts or benchmark timings in an expressive way.',
+ 'sort_direction_title' => 'New <code>SortDirection</code>
enum',
+ 'sort_direction_description' => '<p>The
<code>SortDirection</code> enum provides a shared, type-safe way to express sort order
with its <code>Ascending</code> and <code>Descending</code> cases.
Previously, every library had to define its own way of representing sort direction, resulting in a
mix of incompatible integers, strings, booleans, and custom enums. Since
<code>SortDirection</code> is built into PHP, libraries can accept it in their public
APIs without needing adapter code.</p><p>Learn more about this feature in <a
href="https://thephp.foundation/blog/2026/11/03/stdlib-investment/"
target="_blank" rel="noopener noreferrer">The PHP Foundation’s
blog</a>.</p>',
+ 'stream_error_handling_title' => 'Stream Error Handling',
+ 'stream_error_handling_description' => 'Stream operations can now be
configured to throw a <code>StreamException</code> or to fail silently instead of
emitting warnings. Errors are reported as structured <code>StreamError</code> objects
with a <code>StreamErrorCode</code> enum case, the wrapper name, and the affected path
or URL, and can also be retrieved later with <code>stream_last_errors()</code> or passed
to a custom error handler.',
+ 'doc_comments_title' => 'DocComments For Function Parameters',
+ 'doc_comments_description' => 'Function and method parameters can now have
their own DocComments, which are available via the new
<code>ReflectionParameter::getDocComment()</code> method.. This allows each parameter to
be documented right next to its declaration, without repeating its name and type in a
<code>@param</code> tag.',
+ 'isreadable_iswriteable_title' => 'New
<code>ReflectionProperty::isReadable()</code> and
<code>ReflectionProperty::isWritable()</code> methods',
+ 'isreadable_iswriteable_description' => 'With readonly properties, asymmetric
visibility, and property hooks, checking whether a property is public is no longer enough to know
whether it can be read or written. The new methods answer this directly for a given scope, and
optionally for a specific object, taking into account visibility, initialization state, hooks, and
magic methods.',
+
+ 'new_classes_title' => 'Additional features and improvements',
+ 'new_override_constants' => 'The <code>#[\Override]</code>
attribute can now be applied to class constants and enum cases.',
+ 'new_enum_debug_info' => 'Enums can now implement the
<code>__debugInfo()</code> magic method.',
+ 'new_const_object_writes' => 'Properties of objects stored in constants can
now be modified directly, e..g. <code>Config::DEFAULTS->timeout =
30</code>.',
+ 'new_uri_builder' => 'New <code>Uri\Rfc3986\UriBuilder</code> and
<code>Uri\WhatWg\UrlBuilder</code> classes build URIs from their components, along with
new methods for detecting URI and host types and a
<code>Uri\WhatWg\url_percent_encode()</code> function.',
+ 'new_sodium' => 'The Sodium extension adds post-quantum key encapsulation
(X-Wing and ML-KEM-768), IP address encryption, and the SHAKE and TurboSHAKE extendable-output
functions.',
+ 'new_tls' => 'TLS streams now support session resumption, external pre-shared
keys, and TLS 1.3 early data (0-RTT).',
+ 'new_mysqli_quote_string' => 'New
<code>mysqli::quote_string()</code> method escapes a string and wraps it in quotes,
matching <code>PDO::quote()</code>.',
+ 'new_pack_endianness' => '<code>pack()</code> and
<code>unpack()</code> now accept the <code><</code> and
<code>></code> endianness modifiers on integer and float format codes.',
+ 'new_json_error_location' => 'JSON error messages now include the location of
the error in the input.',
+ 'new_error_include_args' => 'The new
<code>error_include_args</code> INI setting consistently includes function arguments in
error messages.',
+ 'new_intl' => 'New <code>grapheme_strrev()</code> function
reverses strings by grapheme cluster, and the new <code>IntlNumberRangeFormatter</code>
class formats ranges of numbers.',
+ 'new_zip' => 'New <code>ZipArchive::openString()</code> and
<code>ZipArchive::closeString()</code> methods work with in-memory archives.',
+ 'new_performance' => 'Performance improvements include compiling
<code>array_map()</code> with first-class callable or partial application callbacks into
loops, faster <code>printf()</code> calls, caching of stateless closures, and faster
JSON encoding.',
+
+ 'bc_title' => 'Deprecations and backward compatibility breaks',
+ 'bc_return_in_finally' => 'Using <code>return</code> inside a
<code>finally</code> block is now deprecated, as it silently discards exceptions and
overrides values returned from the <code>try</code> or <code>catch</code>
block.',
+ 'bc_constructor_return' => 'Returning a value from
<code>__construct()</code> or <code>__destruct()</code> and making them
generators is now deprecated. Declaring a nullable return type for
<code>__debugInfo()</code> is also deprecated.',
+ 'bc_reserved_identifiers' => 'Using <code>let</code> or
<code>is</code> as the name of a class, function, or constant is now deprecated. Using
<code>_</code> as a constant name, <code>namespace</code> as a class
constant name, or <code>readonly</code> as a function name is also deprecated.',
+ 'bc_mbregex' => 'The mbstring regular expression functions such as
<code>mb_ereg()</code> and <code>mb_split()</code> have been deprecated, as
the underlying Oniguruma library is no longer maintained. PCRE functions with the
<code>u</code> modifier can be used instead.',
+ 'bc_type_aliases' => 'The <code>is_double()</code>,
<code>is_long()</code>, <code>is_integer()</code>, and
<code>doubleval()</code> aliases have been deprecated. Use
<code>is_float()</code>, <code>is_int()</code>, and
<code>floatval()</code> instead.',
+ 'bc_spl_object_hash' => '<code>spl_object_hash()</code> has been
deprecated in favor of <code>spl_object_id()</code>, and
<code>spl_classes()</code> in favor of
<code>ReflectionExtension::getClassNames()</code>.',
+ 'bc_objects_as_arrays' => 'Passing an object where an array is expected to
<code>array_walk()</code>, <code>array_walk_recursive()</code>,
<code>http_build_query()</code>, <code>mb_convert_variables()</code>, and
compression functions and filters is now deprecated. Use <code>get_object_vars()</code>
to convert the object first.',
+ 'bc_strcoll' => '<code>strcoll()</code> and the
<code>SORT_LOCALE_STRING</code> sort flag have been deprecated. Use the
<code>Collator</code> class from the intl extension instead.',
+ 'bc_ignored_arguments' => 'Passing a third argument to
<code>define()</code> is now deprecated, as is calling <code>is_a()</code>
or <code>is_subclass_of()</code> with a class name string when
<code>$allow_string</code> is <code>false</code>.',
+ 'bc_php_filter' => 'Using more than 16 filters in a
<code>php://filter</code> URL without setting the
<code>filter.max_filter_count</code> context option is now deprecated.',
+ 'bc_session_defaults' => 'Sessions are now more secure by default:
<code>session.use_strict_mode</code> and
<code>session.cookie_httponly</code> are enabled, and
<code>session.cookie_samesite</code> is set to <code>Lax</code>.',
+ 'bc_session_handlers' => 'Custom session handlers that do not implement both
<code>create_sid()</code> and <code>validateId()</code> are now
deprecated..',
+ 'bc_other_deprecations' => 'The <code>metaphone()</code>,
<code>mysqli_get_charset()</code>, and <code>mysqli_stmt_init()</code>
functions are now deprecated, along with the CSV methods of <code>SplFileObject</code>
and the sorting, flag, and serialization methods of <code>ArrayIterator</code>.',
+ 'bc_trim_form_feed' => '<code>trim()</code>,
<code>ltrim()</code>, and <code>rtrim()</code> now also strip form feed
(<code>\f</code>) characters by default.',
+ 'bc_stream_close_errors' => '<code>fclose()</code>,
<code>file_put_contents()</code>, and <code>copy()</code> now return
<code>false</code> when flushing or closing the stream fails, instead of silently
ignoring the failure.',
+ 'bc_value_errors' => 'Many functions now throw a
<code>ValueError</code> for out-of-range values, invalid flags, or strings containing
NUL bytes, instead of silently truncating or ignoring them.',
+
+ 'footer_title' => 'Better syntax, improved performance and type
safety.',
+ 'footer_description' => '<p class="first-paragraph">The full
list of changes is recorded in the <a href="/ChangeLog-8.php#PHP_8_6"
target="_blank">ChangeLog</a>.</p><p>Please consult the <a
href="/manual/en/migration86.php" target="_blank">migration guide</a>
for a detailed list of new features and backward-incompatible changes.</p>',
+];
diff --git a/public/releases/8.6/languages/ru.php b/public/releases/8.6/languages/ru.php
new file mode 100644
index 0000000000..6d168ea5f1
--- /dev/null
+++ b/public/releases/8.6/languages/ru.php
@@ -0,0 +1,79 @@
+<?php
+
+return [
+ 'common_header' => 'PHP 8.6 — большое обновление
языка PHP с новыми возможностями, включая частичное
применение функций, новый класс Duration, Polling API и новую
функцию clamp()',
+ 'main_title' => 'Лучше, быстрее, надолго',
+ 'main_subtitle' => '<p><strong>PHP 8.6 — большое
обновление языка PHP</strong>. Оно содержит новые
возможности, включая <strong>частичное применение
функций</strong>, новый класс <strong>Duration</strong>,
<strong>Polling API</strong> и новую функцию
<strong>clamp()</strong>.</p>',
+
+ 'whats_new' => 'Что нового в 8.6',
+ 'upgrade_now' => 'Переходите на PHP 8.6!',
+ 'old_version' => 'PHP 8.5 и ранее',
+ 'badge_new' => 'Новинка',
+ 'documentation' => 'Документация',
+ 'released' => 'Будет выпущен 19 ноября 2026',
+ 'release_unavailable_reason' => 'PHP 8.6 ещё не выпущен.
Релиз запланирован на 19 ноября 2026 года.',
+ 'key_features' => 'Основные возможности PHP 8.6',
+ 'key_features_description' =>
'<p><strong>Быстрее</strong>, <strong>лучше</strong>,
<strong>доступнее для разработчиков</strong>.</p>',
+
+ 'features_pfa_description' => '<p>Позволяет вызывать
функции, передавая лишь часть обязательных
параметров, а остальные — позже.</p>',
+ 'features_readonly_property_defaults_description' =>
'<p>Позволяет задавать значения по умолчанию для
readonly-свойств экземпляра.</p>',
+ 'features_polling_api_description' => '<p>Масштабируемое
мультиплексирование ввода-вывода на основе epoll, kqueue и
других нативных механизмов — для библиотек
событийных циклов вроде ReactPHP и AMPHP.</p>',
+ 'features_clamp_description' => '<p>Гарантирует, что
значение (числовое или любое другое) находится в
заданном диапазоне.</p>',
+ 'features_duration_description' => '<p>Класс Duration
представляет прошедшее время, измеренное
секундомером.</p>',
+ 'features_sort_direction_description' => '<p>SortDirection —
перечисление с двумя вариантами (Ascending и Descending) и без
связанного поведения.</p>',
+
+ 'pfa_title' => 'Частичное применение функций',
+ 'pfa_description' => 'Позволяет вызывать функции,
передавая лишь часть обязательных параметров, а
остальные — позже.',
+ 'readonly_property_defaults_title' => 'Значения по
умолчанию для readonly-свойств',
+ 'readonly_property_defaults_description' => 'Позволяет
задавать значения по умолчанию для readonly-свойств
экземпляра.',
+ 'polling_api_title' => 'Polling API',
+ 'polling_api_description' => 'Новый API <code>Io\Poll</code>
эффективно отслеживает множество потоков
одновременно, используя лучший механизм, доступный на
каждой платформе (epoll, kqueue, event ports или WSAPoll), и не
упирается в ограничения масштабируемости
<code>stream_select()</code>. Он задуман как общая основа, на
которой могут строиться библиотеки событийных циклов,
такие как ReactPHP и AMPHP.',
+ 'clamp_title' => 'Новая функция
<code>clamp()</code>',
+ 'clamp_description' => 'Гарантирует, что заданное
значение (числовое или любое другое) находится в
указанном диапазоне. В противном случае возвращается
ближайшее значение в пределах границ диапазона.',
+ 'duration_title' => 'Новый класс
<code>\Time\Duration</code>',
+ 'duration_description' => 'Класс Duration представляет
прошедшее время, измеренное секундомером. Его
представление не привязано ни к какому времени и
часовому поясу и позволяет выразить диапазон более
чем в 250 лет с точностью до наносекунды. Поэтому он
отлично подходит для выразительного представления
таймаутов или результатов бенчмарков.',
+ 'sort_direction_title' => 'Новое перечисление
<code>SortDirection</code>',
+ 'sort_direction_description' => '<p>SortDirection —
перечисление с двумя вариантами (Ascending и Descending) и без
связанного поведения.</p><p>Подробнее об этой
возможности — в <a href="https://thephp.foundation/blog/2026/11/03/stdlib-investment/"
target="_blank" rel="noopener noreferrer">блоге PHP
Foundation</a>.</p>',
+ 'stream_error_handling_title' => 'Обработка ошибок в
потоках',
+ 'stream_error_handling_description' => 'Теперь операции с
потоками можно настроить так, чтобы они выбрасывали
<code>StreamException</code> или тихо завершались с ошибкой
вместо вывода предупреждений. Ошибки сообщаются в
виде структурированных объектов <code>StreamError</code> с
вариантом перечисления <code>StreamErrorCode</code>, именем
обёртки и затронутым путём или URL; их также можно
получить позже через <code>stream_last_errors()</code> или
передать собственному обработчику ошибок.',
+ 'doc_comments_title' => 'DocComments для параметров
функций',
+ 'doc_comments_description' => 'Параметры функций и
методов теперь могут иметь собственные DocComments,
доступные через новый метод
<code>ReflectionParameter::getDocComment()</code>. Это позволяет
документировать каждый параметр прямо рядом с его
объявлением, не повторяя его имя и тип в теге
<code>@param</code>.',
+ 'isreadable_iswriteable_title' => 'Новые методы
<code>ReflectionProperty::isReadable()</code> и
<code>ReflectionProperty::isWritable()</code>',
+ 'isreadable_iswriteable_description' => 'С появлением
readonly-свойств, асимметричной видимости и хуков свойств
проверки на <code>public</code> уже недостаточно, чтобы
понять, можно ли прочитать свойство или записать в
него. Новые методы отвечают на этот вопрос напрямую
для заданной области видимости — и при необходимости
для конкретного объекта, — учитывая видимость,
состояние инициализации, хуки и магические методы.',
+
+ 'new_classes_title' => 'Дополнительные возможности
и улучшения',
+ 'new_override_constants' => 'Атрибут
<code>#[\Override]</code> теперь можно применять к
константам классов и вариантам перечислений.',
+ 'new_enum_debug_info' => 'Перечисления теперь могут
реализовывать магический метод
<code>__debugInfo()</code>.',
+ 'new_const_object_writes' => 'Свойства объектов,
хранящихся в константах, теперь можно изменять
напрямую, например: <code>Config::DEFAULTS->timeout =
30</code>.',
+ 'new_uri_builder' => 'Новые классы
<code>Uri\Rfc3986\UriBuilder</code> и <code>Uri\WhatWg\UrlBuilder</code>
собирают URI из компонентов. Кроме того, добавлены
методы для определения типов URI и хостов и функция
<code>Uri\WhatWg\url_percent_encode()</code>.',
+ 'new_sodium' => 'Модуль Sodium получил
постквантовое инкапсулирование ключей (X-Wing и ML-KEM-768),
шифрование IP-адресов и расширяемые выходные функции
SHAKE и TurboSHAKE.',
+ 'new_tls' => 'TLS-потоки теперь поддерживают
возобновление сессий, внешние предварительно общие
ключи (PSK) и ранние данные TLS 1.3 (0-RTT).',
+ 'new_mysqli_quote_string' => 'Новый метод
<code>mysqli::quote_string()</code> экранирует строку и
заключает её в кавычки, как <code>PDO::quote()</code>.',
+ 'new_pack_endianness' => '<code>pack()</code> и
<code>unpack()</code> теперь принимают модификаторы
порядка байтов <code><</code> и <code>></code>
в кодах формата целых чисел и чисел с плавающей
точкой.',
+ 'new_json_error_location' => 'Сообщения об ошибках JSON
теперь включают место ошибки во входных данных.',
+ 'new_error_include_args' => 'Новая INI-настройка
<code>error_include_args</code> последовательно включает
аргументы функций в сообщения об ошибках.',
+ 'new_intl' => 'Новая функция
<code>grapheme_strrev()</code> переворачивает строки по
графемным кластерам, а новый класс
<code>IntlNumberRangeFormatter</code> форматирует диапазоны
чисел.',
+ 'new_zip' => 'Новые методы
<code>ZipArchive::openString()</code> и
<code>ZipArchive::closeString()</code> работают с архивами в
памяти.',
+ 'new_performance' => 'Среди улучшений
производительности — компиляция <code>array_map()</code>
с callback-ами первого класса или частичным применением в
циклы, более быстрые вызовы <code>printf()</code>,
кеширование замыканий без состояния и ускоренное
кодирование JSON.',
+
+ 'bc_title' => 'Устаревшая функциональность и
изменения в обратной совместимости',
+ 'bc_return_in_finally' => 'Использование
<code>return</code> внутри блока <code>finally</code>
объявлено устаревшим: оно молча отбрасывает
исключения и перекрывает значения, возвращённые из
блока <code>try</code> или <code>catch</code>.',
+ 'bc_constructor_return' => 'Возврат значения из
<code>__construct()</code> или <code>__destruct()</code> и
превращение их в генераторы объявлены устаревшими.
Объявление nullable-типа возврата для
<code>__debugInfo()</code> также устарело.',
+ 'bc_reserved_identifiers' => 'Использование
<code>let</code> или <code>is</code> в качестве имени
класса, функции или константы объявлено устаревшим.
Также устарело использование <code>_</code> как имени
константы, <code>namespace</code> как имени константы
класса и <code>readonly</code> как имени функции.',
+ 'bc_mbregex' => 'Регулярные функции mbstring, такие
как <code>mb_ereg()</code> и <code>mb_split()</code>, объявлены
устаревшими, поскольку лежащая в их основе библиотека
Oniguruma больше не поддерживается. Вместо них можно
использовать функции PCRE с модификатором
<code>u</code>.',
+ 'bc_type_aliases' => 'Псевдонимы
<code>is_double()</code>, <code>is_long()</code>,
<code>is_integer()</code> и <code>doubleval()</code> объявлены
устаревшими. Используйте <code>is_float()</code>,
<code>is_int()</code> и <code>floatval()</code>.',
+ 'bc_spl_object_hash' => 'Функция
<code>spl_object_hash()</code> объявлена устаревшей в пользу
<code>spl_object_id()</code>, а <code>spl_classes()</code> — в
пользу <code>ReflectionExtension::getClassNames()</code>.',
+ 'bc_objects_as_arrays' => 'Передача объекта туда, где
ожидается массив, в <code>array_walk()</code>,
<code>array_walk_recursive()</code>, <code>http_build_query()</code>,
<code>mb_convert_variables()</code>, а также в функции и фильтры
сжатия объявлена устаревшей. Сначала преобразуйте
объект с помощью <code>get_object_vars()</code>.',
+ 'bc_strcoll' => 'Функция <code>strcoll()</code> и
флаг сортировки <code>SORT_LOCALE_STRING</code> объявлены
устаревшими. Вместо них используйте класс
<code>Collator</code> из модуля intl.',
+ 'bc_ignored_arguments' => 'Передача третьего
аргумента в <code>define()</code> объявлена устаревшей,
как и вызов <code>is_a()</code> или
<code>is_subclass_of()</code> со строкой имени класса, когда
<code>$allow_string</code> равен <code>false</code>.',
+ 'bc_php_filter' => 'Использование более 16 фильтров
в URL <code>php://filter</code> без установки контекстной
опции <code>filter.max_filter_count</code> объявлено
устаревшим.',
+ 'bc_session_defaults' => 'Сессии теперь безопаснее по
умолчанию: включены <code>session.use_strict_mode</code> и
<code>session.cookie_httponly</code>, а для
<code>session.cookie_samesite</code> задано значение
<code>Lax</code>.',
+ 'bc_session_handlers' => 'Пользовательские
обработчики сессий, не реализующие одновременно
<code>create_sid()</code> и <code>validateId()</code>, объявлены
устаревшими.',
+ 'bc_other_deprecations' => 'Функции
<code>metaphone()</code>, <code>mysqli_get_charset()</code> и
<code>mysqli_stmt_init()</code> объявлены устаревшими, как и
CSV-методы <code>SplFileObject</code> и методы сортировки,
работы с флагами и сериализации
<code>ArrayIterator</code>.',
+ 'bc_trim_form_feed' => '<code>trim()</code>,
<code>ltrim()</code> и <code>rtrim()</code> теперь по
умолчанию удаляют и символ перевода страницы
(<code>\f</code>).',
+ 'bc_stream_close_errors' => '<code>fclose()</code>,
<code>file_put_contents()</code> и <code>copy()</code> теперь
возвращают <code>false</code>, если сброс или закрытие
потока завершилось ошибкой, вместо того чтобы молча её
игнорировать.',
+ 'bc_value_errors' => 'Многие функции теперь
выбрасывают <code>ValueError</code> при выходе значения за
диапазон, недопустимых флагах или строках с NUL-байтами,
вместо того чтобы молча обрезать или игнорировать
их.',
+
+ 'footer_title' => 'Выше производительность, лучше
синтаксис, надёжнее система типов.',
+ 'footer_description' => '<p
class="first-paragraph">Полный список изменений приведён
в <a href="/ChangeLog-8.php#PHP_8_6"
target="_blank">ChangeLog</a>.</p><p>Подробный список
новых возможностей и изменений, ломающих обратную
совместимость, смотрите в <a href="/manual/ru/migration86.php"
target="_blank">руководстве по
миграции</a>.</p>',
+];
diff --git a/public/releases/8.6/release.inc b/public/releases/8.6/release.inc
new file mode 100644
index 0000000000..d04bba0db5
--- /dev/null
+++ b/public/releases/8.6/release.inc
@@ -0,0 +1,601 @@
+<?php
+
+use phpweb\Themes\FeatureComparison;
+use phpweb\Themes\ReleasePage;
+use function releases\php86\common_header;
+use function releases\php86\message;
+
+if (!isset($lang)) {
+ $lang = 'en';
+}
+if (!isset($documentation)) {
+ $documentation = $lang;
+}
+
+$_SERVER['BASE_PAGE'] = 'releases/8.6/' . $lang . '.php';
+
+require_once __DIR__ . '/common.php';
+
+common_header(message('common_header', $lang));
+
+$comparisons = [
+ new FeatureComparison(
+ id: 'partial-function-application',
+ title: message('pfa_title', $lang),
+ description: message('pfa_description', $lang),
+ links: [
+ 'RFC|https://wiki.php.net/rfc/partial_function_application_v2',
+ message('documentation', $lang) .
"|/manual/$documentation/functions.partial-application.php",
+ ],
+ before: <<<'PHP'
+ $versions = ['8.4', '8.5', '8.6', '8.7',
'9.0'];
+
+ $supported = array_filter(
+ $versions,
+ fn ($version) => version_compare($version, '8.6', '>='),
+ );
+ PHP,
+ after: <<<'PHP'
+ $versions = ['8.4', '8.5', '8.6', '8.7',
'9.0'];
+
+ $supported = array_filter(
+ $versions,
+ version_compare(?, '8.6', '>='),
+ );
+ PHP,
+ ),
+ new FeatureComparison(
+ id: 'duration-class',
+ title: message('duration_title', $lang),
+ description: message('duration_description', $lang),
+ links: [
+ 'RFC|https://wiki.php.net/rfc/duration_class',
+ message('documentation', $lang) .
"|/manual/$documentation/class.time-duration.php",
+ ],
+ before: <<<'PHP'
+ /**
+ * All delays are in microseconds.
+ */
+ function backoff(
+ int $baseDelay,
+ int $step,
+ int $attempt,
+ ): void {
+ $delay = $baseDelay + ($step * (2 ** $attempt));
+
+ // Wait at most 30 seconds.
+ usleep(min($delay, 30_000_000));
+ }
+
+ // 1 second base delay, plus 100 milliseconds
+ // doubling with each attempt.
+ backoff(1_000_000, 100_000, $attempt);
+ PHP,
+ after: <<<'PHP'
+ use Time\Duration;
+
+ function backoff(
+ Duration $baseDelay,
+ Duration $step,
+ int $attempt,
+ ): void {
+ $delay = $baseDelay->add($step->multiplyBy(2 ** $attempt));
+
+ // Durations are comparable, so min() works directly.
+ $delay = min($delay, Duration::fromSeconds(30));
+
+ time_nanosleep($delay->seconds, $delay->nanoseconds);
+ }
+
+ backoff(
+ Duration::fromSeconds(1),
+ Duration::fromMilliseconds(100),
+ $attempt,
+ );
+
+ // Preconfigure the delays using Partial Function Application.
+ $waitBeforeRetry = backoff(
+ Duration::fromSeconds(1),
+ Duration::fromMilliseconds(100),
+ attempt: ?,
+ );
+ $waitBeforeRetry($attempt);
+ PHP,
+ ),
+ new FeatureComparison(
+ id: 'polling-api',
+ title: message('polling_api_title', $lang),
+ description: message('polling_api_description', $lang),
+ links: [
+ 'RFC|https://wiki.php.net/rfc/poll_api',
+ ],
+ before: <<<'PHP'
+ $server = stream_socket_server('tcp://0.0.0.0:8080');
+ $clients = [];
+
+ while (true) {
+ $read = [$server, ...$clients];
+ $write = $except = null;
+
+ // Based on select(), which typically can't handle
+ // more than 1024 connections
+ stream_select($read, $write, $except, null);
+
+ foreach ($read as $stream) {
+ if ($stream === $server) {
+ $clients[] = stream_socket_accept($server);
+ continue;
+ }
+
+ $data = fread($stream, 8192);
+
+ if ($data === '' || $data === false) {
+ $key = array_search($stream, $clients, true);
+ unset($clients[$key]);
+ fclose($stream);
+ } else {
+ fwrite($stream, $data);
+ }
+ }
+ }
+ PHP,
+ after: <<<'PHP'
+ use Io\Poll\{Context, Event};
+
+ $server = stream_socket_server('tcp://0.0.0.0:8080');
+
+ // Automatically uses epoll, kqueue, event ports, or WSAPoll
+ $poll = new Context();
+ $poll->add(new StreamPollHandle($server), [Event::Read]);
+
+ while (true) {
+ foreach ($poll->wait() as $watcher) {
+ $stream = $watcher->getHandle()->getStream();
+
+ if ($stream === $server) {
+ $client = stream_socket_accept($server);
+ $poll->add(
+ new StreamPollHandle($client),
+ [Event::Read],
+ );
+ continue;
+ }
+
+ $data = fread($stream, 8192);
+
+ if ($data === '' || $data === false) {
+ $watcher->remove();
+ fclose($stream);
+ } else {
+ fwrite($stream, $data);
+ }
+ }
+ }
+ PHP,
+ ),
+ new FeatureComparison(
+ id: 'stream-error-handling',
+ title: message('stream_error_handling_title', $lang),
+ description: message('stream_error_handling_description', $lang),
+ links: [
+ 'RFC|https://wiki.php.net/rfc/stream_errors',
+ ],
+ before: <<<'PHP'
+ $config = @file_get_contents('/etc/app/config.json');
+
+ if ($config === false) {
+ // Only an unstructured message string is available
+ $error = error_get_last();
+ log_error($error['message']);
+ }
+ PHP,
+ after: <<<'PHP'
+ $context = stream_context_create([
+ 'stream' => [
+ 'error_mode' => StreamErrorMode::Exception,
+ ],
+ ]);
+
+ try {
+ $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,
+ );
+ }
+ }
+ PHP,
+ ),
+ 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)
+
+ // Any comparable value works with clamp(). This
+ // includes the new Duration class.
+ var_dump(clamp(
+ \Time\Duration::fromSeconds(30),
+ min: \Time\Duration::fromMinutes(1),
+ max: \Time\Duration::fromMinutes(10),
+ )->seconds);
+ // int(60)
+ PHP,
+ ),
+ new FeatureComparison(
+ id: 'sort-direction-enum',
+ title: message('sort_direction_title', $lang),
+ description: message('sort_direction_description', $lang),
+ links: [
+ 'RFC|https://wiki.php.net/rfc/sort_direction_enum',
+ message('documentation', $lang) .
"|/manual/$documentation/enum.sortdirection.php",
+ ],
+ before: <<<'PHP'
+ class QueryBuilder
+ {
+ private array $orderBy = [];
+
+ public function orderBy(
+ string $column,
+ int $direction = SORT_ASC,
+ ): static {
+ $this->orderBy[] = $column . ' ' . match ($direction) {
+ SORT_ASC => 'ASC',
+ SORT_DESC => 'DESC',
+ };
+
+ return $this;
+ }
+ }
+
+ $qb->orderBy('name', SORT_DESC);
+ $qb->orderBy('name', SORT_STRING);
+ // Accepted by the signature, then fails inside the method:
+ // UnhandledMatchError: Unhandled match case 2
+ PHP,
+ after: <<<'PHP'
+ class QueryBuilder
+ {
+ private array $orderBy = [];
+
+ public function orderBy(
+ string $column,
+ SortDirection $direction = SortDirection::Ascending,
+ ): static {
+ $this->orderBy[] = $column . ' ' . match ($direction) {
+ SortDirection::Ascending => 'ASC',
+ SortDirection::Descending => 'DESC',
+ };
+
+ return $this;
+ }
+ }
+
+ $qb->orderBy('name', SortDirection::Descending);
+ $qb->orderBy('name', SORT_STRING);
+ // TypeError: QueryBuilder::orderBy(): Argument #2 ($direction)
+ // must be of type SortDirection, int given
+ PHP,
+ ),
+ new FeatureComparison(
+ id: 'doc-comments',
+ title: message('doc_comments_title', $lang),
+ description: message('doc_comments_description', $lang),
+ links: [
+ 'RFC|https://wiki.php.net/rfc/parameter-doccomments',
+ ],
+ before: <<<'PHP'
+ class DB
+ {
+ /**
+ * Returns up to $limit items matching the $query.
+ *
+ * @param string $query Terms to search
+ * @param int $limit Maximum number of results
+ */
+ public function search(string $query, int $limit = 10): array
+ {
+ return [];
+ }
+ }
+
+ // Parameter descriptions can only be extracted
+ // by parsing the function's DocComment.
+ PHP,
+ after: <<<'PHP'
+ class DB
+ {
+ /**
+ * Returns up to $limit items matching the $query.
+ */
+ public function search(
+ /** Terms to search */
+ string $query,
+
+ /** Maximum number of results */
+ int $limit = 10,
+ ): array {
+ return [];
+ }
+ }
+
+ var_dump(
+ new ReflectionParameter([DB::class, 'search'], 'query')
+ ->getDocComment(),
+ );
+ // string(22) "/** Terms to search */"
+ PHP,
+ ),
+ new FeatureComparison(
+ id: 'isreadable-iswriteable',
+ title: message('isreadable_iswriteable_title', $lang),
+ description: message('isreadable_iswriteable_description', $lang),
+ links: [
+ 'RFC|https://wiki.php.net/rfc/isreadable-iswriteable',
+ ],
+ before: '',
+ after: <<<'PHP'
+ class NewsEntry
+ {
+ public string $title = 'PHP 8..6 released!';
+
+ public private(set) string $slug = 'php-86-released';
+ }
+
+ $entry = new NewsEntry();
+ foreach (['title', 'slug'] as $item) {
+ $property = new ReflectionProperty(NewsEntry::class, $item);
+ printf(
+ "%s: isReadable=%s isWritable=%s\n",
+ $item,
+ $property->isReadable(null, $entry) ? 'yes' : 'no',
+ $property->isWritable(null, $entry) ? 'yes' : 'no',
+ );
+ }
+ // title: isReadable=yes isWritable=yes
+ // slug: isReadable=yes isWritable=no
+ PHP,
+ ),
+ new FeatureComparison(
+ id: 'readonly-property-defaults',
+ title: message('readonly_property_defaults_title', $lang),
+ description: message('readonly_property_defaults_description', $lang),
+ links: [
+ 'RFC|https://wiki.php.net/rfc/readonly_property_defaults',
+ ],
+ before: <<<'PHP'
+ interface Rule
+ {
+ public string $parser { get; }
+ }
+
+ final readonly class SlugRule implements Rule
+ {
+ public string $parser;
+
+ public function __construct()
+ {
+ $this->parser = SlugParser::class;
+ }
+ }
+ PHP,
+ after: <<<'PHP'
+ interface Rule
+ {
+ public string $parser { get; }
+ }
+
+ final readonly class SlugRule implements Rule
+ {
+ public string $parser = SlugParser::class;
+ }
+ PHP,
+ ),
+];
+
+echo ReleasePage::getHeroSection(
+ title: message('main_title', $lang),
+ subtitle: message('main_subtitle', $lang),
+ logoSvg: <<<'SVG'
+ <svg class="hero-php-logo" width="484" height="138"
viewBox="0 0 484 138" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M21..7836
130.5H0L19.3978 30.4113H61.2017C73.7532 30.4113 82.9853 33.7441 88.6905 40.3056C94.4995 46.9713
96.1592 56.1365 93.8771 68.1139C92.9435 73.009 91.2838 77.4875 89.1055 81.5494C86.8234 85.6113
83.9189 89.3607 80.2883 92.6935C75.9316 96.7554 71.1599 99.6716 65.8696 101.442C60.5793 103.213
53.8367 104.046 45.5382 104.046H26.8665L21.7836 130.5ZM69.3965 50.7207C66.5957 47.7003 61.0979
46.138 52.9031 46.138H38.0695L29.9784 88.1109H43.1524C51.8658 88.1109 58.4009 86.4445 62.7576
83.1116C67.0106 79.7788 69.9151 74.2588 71.4711 66.5516C72.8196 59.0528 72.0935 53.8452 69.3965
50.7207Z" fill="currentColor"/>
+ <path d="M109.748 3.74902H131.324L126.138 30.4117H145.328C157.465 30.4117 165.763
32.4947 170.328 36.7649C174.892 41.035 176.344 47.909 174.477 57.3867L165.452
104.047H143.565L152.174 59.6781C153.108 54.6788 152.797 51.2418 151.137 49.3671C149.477 47.4924
145.847 46.6592 140.349 46.6592H123.13L112.03 104.047H90.3508L109.748 3.74902Z"
fill="currentColor"/>
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M191.281
130.5H169.498L188.895 30.4113H230.803C243.354 30.4113 252.587 33.7441 258..292 40.3056C264.101
46.9713 265.761 56.1365 263.478 68.1139C262.545 73.009 260.885 77.4875 258.707 81.5494C256.425
85.6113 253.52 89.3607 249.89 92.6935C245.533 96.7554 240.761 99.6716 235.471 101.442C230.181
103.213 223.438 104.046 215.139 104.046H196.468L191.281 130.5ZM238.998 50.7207C236.197 47.7003
230.699 46.138 222.504 46.138H207.567L199.476 88.1109H212.65C221.363 88.1109 227.898 86.4445 232.255
83.1116C236.508 79.7788 239.413 74.2588 240.969 66.5516C242.317 59.0528 241.695 53.8452 238.998
50.7207Z" fill="currentColor"/>
+ <path d="M328.518 49.9925C322.606 35.8279 317.627 23.5381 322.502 14.9977C324.369
12.394 326.444 11.04 328.726 11.04C333.394 11.04 337.647 16.1434 337.647 16.1434L343.559
23.3298L339.825 14.7894C339.618 14..477 333.29 0 321.983 0C318.041 0 313.892 1.77057 309.847
5.3117L309.743 5.41585C299.888 16.8725 309.535 38.5358 318.145 57.5955L324.473 72.3849C327.377
79.9879 330.282 89.0491 328.518 95.7147C325.821 106.13 316.589 113.212 316.485 113.316L310.573
117.899L317.73 115.608C318.456 115.399 334.327 110.192 338.165 96.3396C340.551 84.9872 337.543
73.6347 334.535 64.886C334.95 64..5736 334.12 65.1985 334.535 64.886L329.037 50.6174"
fill="currentColor"/>
+ <path d="M346.049 9.78979L338.684 1.66602L343.974 11.352C344.078 11.4562 350.509
23.5377 342.315 37.5981C339.306 41.9724 334.638 46.3468 328.726 50.7211L318.041 57.6992C317.938
57.5951 317.938 57.4909 318.041 57.6992L317.626 58.0117C305.697 64.8856 294.598 69.0517 294.391
69.1558C277.897 76.5505 267.524 88.0071 266.072 100.714C264.931 110.296 269.391 119.669 278..105
126.231L278.208 126.335C283.706 129.668 289.619 131.334 295.843 131.334C312.129 131.334 324.888
119.982 325.406 119.461L333.394 112.275L323.954 117.274C323.85 117.274 315.967 121.44 307.772
121.44C300.407 121.44 295.22 118.211 292.108 111.65C288.167 97.6932 301.963 88.1113 317.834
77.0713C319.909 75.6132 322.087 74.0509 324.265 72.5928L324.369 72.4887L333.809 65.4064C333.912
65.1981 334.223 64.9898 334.223 64.9898C342.003 58.5324 352.273 48.4298 354.659 34.2653C356.526
21.4547 346.464 10.3105 346.049 9.78979Z" fill="#6b58ff"/>
+ <path d="M357.459 85.9246H377.687L374.057 104.359H353.829L357.459 85.9246Z"
fill="currentColor"/>
+ <path d="M446.184 52.0094C450.839 52.0959 454.976 52.6146 458.596 53.5658C462.303
54.5169 465.492 55.9868 468.164 57.9756C470.75 59.8778 472.258 62.688 472.689 66.406C473.206 70.124
472.603 74.7068 470.879 80.1541C469.327 84.9098 467.129 88.9737 464.285 92.3459C461.441 95.6316
457.95 98.2688 453.812 100.258C449.675 102.16 445.495 103.673 441.271 104.797C437.048 105.835
432.781 106.483 428.471 106.742C426.834 106.915 425.196 107.002 423.558 107.002C421.921 107.002
420.283 106.915 418.645 106.742C417.007 106.656 415.456 106.526 413.991 106.353C412.525 106.18
411.103 106.008 409.724 105.835C403.001 104.883 397.7 102.938 393.821 99.9981C389.943 96.9718
387.486 92.9944 386.452 88.0658C385..504 83.1372 385.331 77.8195 385.934 72.1128C386.538 66.3195
387.96 60.1804 390.201 53.6955C392.873 46 396.148 39.515 400.027 34.2406C403.906 28.8797 408.388
24.7293 413.474 21.7895C418.559 18.7631 424.205 16.515 430.411 15.0451C436.617 13.5752 443.34
12.8402 450.58 12.8402L483.679 12.7105L479.412 28.6635H445.796C441.314 28.75 437.306 29.2255 433.772
30.0902C430.324 30.8684 427.351 32.0789 424.851 33.7218C422.438 35.3646 420.197 37.7425 418.128
40.8552C416.146 43.8816 414.422 47.6428 412.956 52.1391L446.184 52.0094ZM440..754
67.9624H408.819C408.733 68.2218 408.647 68.4812 408.56 68.7406C408.56 69 408.517 69.2162 408.431
69.3891C408.431 69.4756 408.388 69.6053 408.302 69.7782C408.302 69.8647 408.302 69.9511 408.302
70.0376C408.302 70.2105 408..259 70.3402 408.173 70.4267C408.173 70.5131 408.173 70.5996 408.173
70.6861C407.828 72.4154 407.612 74.1447 407.526 75.8741C407.526 77.5169 407.569 79.1165 407.655
80.6729C407.828 82.3158 408.345 83.7425 409.207 84.953C410.069 86.1635 411.189 87.2444 412.568
88.1955C413.43 88.7143 414.335 89.1898 415.284 89.6222C416.318 90.0545 417.438 90.4004 418.645
90.6598C419.852 90.9192 421.059 91.1353 422.265 91.3083C423.472 91.4812 424.722 91.5677 426.015
91.5677C427.135 91.6541 428.256 91.6541 429.376 91.5677C430.497 91.4812 431.617 91.3947 432.738
91.3083C433.083 91.2218 433.427 91.1786 433.772 91.1786C434.117 91.0921 434.462 91.0489 434.807
91.0489C435.496 90.8759 436.186 90.703 436.875 90.5301C437.651 90.3571 438.341 90.1842 438.944
90.0113C440.237 89.6654 441.4 89.1466 442.435 88.4549C443.555 87.7631 444.59 86.8985 445.538
85.8609C446.486 84.8233 447.262 83.7425 447.865 82.6184C448.555 81.4944 449.029 80.3703 449.287
79.2462C449.718 77.8628 449.891 76.5225 449.804 75.2256C449.718 73.9286 449.373 72.718 448.77
71.594C448.167 70.3834 447.175 69.5188 445.796 69C444.417 68.3947 442.693 68.0921 440.625
68.0921L440.754 67.9624Z" fill="currentColor"/>
+ </svg>
+ SVG,
+ upgradeNow: message('upgrade_now', $lang),
+ whatsNew: message('whats_new', $lang),
+ released: message('released', $lang),
+ isReleaseAvailable: false,
+ unavailableReason: message('release_unavailable_reason', $lang),
+);
+?>
+ <!-- new features -->
+ <section class="features">
+ <svg aria-hidden="true" width="100%" height="100%"
class="features-pattern">
+ <defs>
+ <pattern id="features-pattern" width="13"
height="13" patternUnits="userSpaceOnUse">
+ <rect x="5.5" y="5.5" width="1"
height="1" fill="currentColor"></rect>
+ </pattern>
+ </defs>
+ <rect width="100%" height="100%"
fill="url(#features-pattern)"></rect>
+ </svg>
+
+ <div class="features-title">
+ <h2 id="features"><?= message('key_features', $lang)
?></h2>
+ <?= message('key_features_description', $lang) ?>
+ </div>
+
+ <div class="features-grid-container">
+ <div class="features-grid">
+ <div class="features-col features-first-col">
+ <div class="features-col-container">
+ <div class="features-col-spacing">
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none"
viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
class="size-6">
+ <path stroke-linecap="round"
stroke-linejoin="round" d="M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025
1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9
9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z" />
+ </svg>
+
+ <a
href="#partial-function-application"><span></span><?=
message('pfa_title', $lang) ?></a>
+ <?= message('features_pfa_description', $lang) ?>
+ </div>
+ </div>
+ </div>
+ <div class="features-col">
+ <div class="features-col-container">
+ <div class="features-col-spacing">
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none"
viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
class="size-6">
+ <path stroke-linecap="round"
stroke-linejoin="round" d="M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"
/>
+ </svg>
+
+ <a
href="#duration-class"><span></span><?=
message('duration_title', $lang) ?>
+ </a>
+ <?= message('features_duration_description', $lang) ?>
+ </div>
+ </div>
+ </div>
+ <div class="features-col features-third-col">
+ <div class="features-col-container">
+ <div class="features-col-spacing">
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none"
viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
class="size-6">
+ <path stroke-linecap="round"
stroke-linejoin="round" d="M6.429 9.75 2.25 12l4.179 2.25m0-4.5 5.571 3
5.571-3m-11.142 0L2.25 7.5 12 2.25l9.75 5.25-4.179 2.25m0 0L21.75 12l-4.179 2.25m0 0 4.179 2.25L12
21.75 2.25 16.5l4.179-2.25m11.142 0-5.571 3-5.571-3" />
+ </svg>
+
+ <a href="#polling-api"><span></span><?=
message('polling_api_title', $lang) ?></a>
+ <?= message('features_polling_api_description', $lang)
?>
+ </div>
+ </div>
+ </div>
+ <div class="features-col features-fourth-col">
+ <div class="features-col-container">
+ <div class="features-col-spacing">
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none"
viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
class="size-6">
+ <path stroke-linecap="round"
stroke-linejoin="round" d="M15.75 5.25v13.5m-7.5-13.5v13.5" />
+ </svg>
+
+ <a
href="#clamp-function"><span></span><?= message('clamp_title',
$lang) ?>
+ </a>
+ <?= message('features_clamp_description', $lang) ?>
+ </div>
+ </div>
+ </div>
+ <div class="features-col">
+ <div class="features-col-container">
+ <div class="features-col-spacing">
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none"
viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
class="size-6">
+ <path stroke-linecap="round"
stroke-linejoin="round" d="M3 7.5 7.5 3m0 0L12 7.5M7.5 3v13.5m13.5 0L16.5 21m0 0L12
16.5m4.5 4.5V7.5" />
+ </svg>
+
+ <a
href="#sort-direction-enum"><span></span><?=
message('sort_direction_title', $lang) ?>
+ </a>
+ <?= message('features_sort_direction_description', $lang)
?>
+ </div>
+ </div>
+ </div>
+ <div class="features-col features-sixth-col">
+ <div class="features-col-container">
+ <div class="features-col-spacing">
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none"
viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
class="size-6">
+ <path stroke-linecap="round"
stroke-linejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398
1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257
1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26
1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0
.255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0
1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0
1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55
0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0
1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1..125 0 0 1-1.369-.49l-1.297-2.247a1.125
1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1
0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0
0 1 1.37-.491l1.216.456c.356.133.751.072
1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z" />
+ <path stroke-linecap="round"
stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
+ </svg>
+
+ <a
href="#readonly-property-defaults"><span></span><?=
message('readonly_property_defaults_title', $lang) ?>
+ </a>
+ <?=
message('features_readonly_property_defaults_description', $lang) ?>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </section>
+
+<?= ReleasePage::getFeatureComparisons($comparisons, 'PHP 8.6',
message('old_version', $lang), message('badge_new', $lang)) ?>
+
+ <section class="release-notes">
+ <div class="release-notes-grid-container">
+ <div class="release-notes-grid">
+ <div>
+ <h2 id="additional-improvements"><?=
message('new_classes_title', $lang) ?></h2>
+ <ul class="new">
+ <li><?= message('new_override_constants', $lang)
?></li>
+ <li><?= message('new_enum_debug_info', $lang)
?></li>
+ <li><?= message('new_const_object_writes', $lang)
?></li>
+ <li><?= message('new_uri_builder', $lang)
?></li>
+ <li><?= message('new_sodium', $lang) ?></li>
+ <li><?= message('new_tls', $lang) ?></li>
+ <li><?= message('new_mysqli_quote_string', $lang)
?></li>
+ <li><?= message('new_pack_endianness', $lang)
?></li>
+ <li><?= message('new_json_error_location', $lang)
?></li>
+ <li><?= message('new_error_include_args', $lang)
?></li>
+ <li><?= message('new_intl', $lang) ?></li>
+ <li><?= message('new_zip', $lang) ?></li>
+ <li><?= message('new_performance', $lang)
?></li>
+ </ul>
+ </div>
+ <div>
+ <h2 id="deprecations-and-bc-breaks"><?=
message('bc_title', $lang) ?></h2>
+ <ul class="old">
+ <li><?= message('bc_return_in_finally', $lang)
?></li>
+ <li><?= message('bc_constructor_return', $lang)
?></li>
+ <li><?= message('bc_reserved_identifiers', $lang)
?></li>
+ <li><?= message('bc_mbregex', $lang) ?></li>
+ <li><?= message('bc_type_aliases', $lang)
?></li>
+ <li><?= message('bc_spl_object_hash', $lang)
?></li>
+ <li><?= message('bc_objects_as_arrays', $lang)
?></li>
+ <li><?= message('bc_strcoll', $lang) ?></li>
+ <li><?= message('bc_ignored_arguments', $lang)
?></li>
+ <li><?= message('bc_php_filter', $lang) ?></li>
+ <li><?= message('bc_session_defaults', $lang)
?></li>
+ <li><?= message('bc_session_handlers', $lang)
?></li>
+ <li><?= message('bc_other_deprecations', $lang)
?></li>
+ <li><?= message('bc_trim_form_feed', $lang)
?></li>
+ <li><?= message('bc_stream_close_errors', $lang)
?></li>
+ <li><?= message('bc_value_errors', $lang)
?></li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </section>
+<?php
+
+echo ReleasePage::getPrefooter(
+ title: message('footer_title', $lang),
+ upgradeNow: message('upgrade_now', $lang),
+ description: message('footer_description', $lang),
+ isReleaseAvailable: false,
+ unavailableReason: message('release_unavailable_reason', $lang),
+);
+
+site_footer(['footer' => false]);
diff --git a/public/releases/8.6/ru.php b/public/releases/8.6/ru.php
new file mode 100644
index 0000000000..55e44842ed
--- /dev/null
+++ b/public/releases/8.6/ru.php
@@ -0,0 +1,5 @@
+<?php
+
+$lang = 'ru';
+
+require_once __DIR__ . '/release.inc';
diff --git a/public/styles/php85.css b/public/styles/php85.css
index 5d957f6239..6122fbb536 100644
--- a/public/styles/php85.css
+++ b/public/styles/php85.css
@@ -442,7 +442,8 @@ a {
background-image: radial-gradient(at 50% 50%, var(--color-white), transparent 65%);
padding-inline: calc(var(--spacing) * 4);
text-align: center;
- margin-inline: auto
+ margin-inline: auto;
+ width: 100%;
}
@media (min-width: 40rem) {
@@ -598,7 +599,8 @@ a {
margin-inline: auto;
margin-bottom: calc(var(--spacing) * 6);
height: calc(var(--spacing) * 12);
- color: var(--color-gray-800)
+ color: var(--color-gray-800);
+ width: auto;
}
@media (min-width: 64rem) {
@@ -677,6 +679,12 @@ a {
}
}
+.hero .release-unavailable-note {
+ margin-top: calc(var(--spacing) * 6);
+ margin-bottom: 0;
+ font-size: var(--text-sm);
+}
+
.features {
isolation: isolate;
z-index: 10;
@@ -1102,7 +1110,7 @@ a {
}
.before-and-after-title-and-description h2 {
- font-size: var(--text-2xl);
+ font-size: var(--text-xl);
line-height: var(--tw-leading, var(--text-2xl--line-height));
font-weight: var(--font-weight-bold)
}
@@ -1685,6 +1693,12 @@ a {
margin-inline-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-x-reverse)))
}
+.cta-footer-content .release-unavailable-note {
+ margin-top: calc(var(--spacing) * -6);
+ margin-bottom: calc(var(--spacing) * 8);
+ font-size: var(--text-sm);
+}
+
.cta-footer-content p {
max-width: var(--container-2xl);
--tw-leading: var(--leading-relaxed);
@@ -2101,6 +2115,11 @@ footer p:where(.dark,.dark *) {
overflow: hidden
}
+.php85 #layout-content a.button-primary--disabled {
+ opacity: .7;
+ cursor: not-allowed;
+}
+
@media (hover: hover) {
.php85 #layout-content a.button-primary:hover {
background-color: oklab(57.9656% .0459944 -.232052/.9)
@@ -2146,6 +2165,11 @@ footer p:where(.dark,.dark *) {
overflow: hidden
}
+.php85 #layout-content a.button-secondary--disabled {
+ opacity: .7;
+ cursor: not-allowed;
+}
+
@media (hover: hover) {
.php85 #layout-content a.button-secondary:hover {
background-color: #f4f4f5f2
diff --git a/src/Themes/ReleasePage.php b/src/Themes/ReleasePage.php
index 2737238a43..8a048ad3ce 100644
--- a/src/Themes/ReleasePage.php
+++ b/src/Themes/ReleasePage.php
@@ -11,6 +11,8 @@ public static function getHeroSection(
string $upgradeNow,
string $whatsNew = '',
string $released = '',
+ bool $isReleaseAvailable = true,
+ string $unavailableReason = '',
): string {
$releasedBadge = '';
if ($released !== '') {
@@ -30,6 +32,15 @@ public static function getHeroSection(
$featuresLink = '<a href="#features"
class="button-primary">' . $whatsNew . '</a>';
}
+ $upgradeLink = $isReleaseAvailable ?
+ '<a href="/downloads.php"
class="button-secondary">' . $upgradeNow . '</a>' :
+ '<a href="javascript:return false;" class="button-secondary
button-secondary--disabled" aria-disabled="true">' . $upgradeNow .
'</a>';
+
+ $unavailableNote = '';
+ if (!$isReleaseAvailable && $unavailableReason !== '') {
+ $unavailableNote = '<p class="release-unavailable-note">' .
$unavailableReason . '</p>';
+ }
+
if (!str_starts_with($subtitle, '<p>')) {
$subtitle = '<p>' . $subtitle . '</p>';
}
@@ -62,17 +73,27 @@ public static function getHeroSection(
<div class="hero-actions">
$featuresLink
- <a href="/downloads.php"
class="button-secondary">$upgradeNow</a>
+ $upgradeLink
</div>
+ $unavailableNote
</div>
</section>
HTML;
}
- public static function getPrefooter(string $title, string $upgradeNow, string $description,
string $extraCredit = ''): string
+ public static function getPrefooter(string $title, string $upgradeNow, string $description,
string $extraCredit = '', bool $isReleaseAvailable = true, string $unavailableReason =
''): string
{
$footer = fancy_footer($extraCredit);
+ $upgradeLink = $isReleaseAvailable ?
+ '<a href="/downloads.php" class="button-primary">'
. $upgradeNow . '</a>' :
+ '<a href="javascript:return false;" class="button-primary
button-primary--disabled" aria-disabled="true">' . $upgradeNow ..
'</a>';
+
+ $unavailableNote = '';
+ if (!$isReleaseAvailable && $unavailableReason !== '') {
+ $unavailableNote = '<p class="release-unavailable-note">' .
$unavailableReason . '</p>';
+ }
+
return <<<HTML
<section class="cta-footer">
<svg aria-hidden="true">
@@ -93,9 +114,11 @@ public static function getPrefooter(string $title, string $upgradeNow, string $d
<h2>$title</h2>
<div class="cta-footer-button-container">
- <a href="/downloads.php"
class="button-primary">$upgradeNow</a>
+ $upgradeLink
</div>
+ $unavailableNote
+
$description
</div>
</section>