Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions public/releases/8.6/common.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
function common_header(string $description): void {
global $MYSITE, $lang;

$meta_image_path = \htmlspecialchars(
\filter_var($MYSITE . 'images/php8/php_8_6_released.png', \FILTER_VALIDATE_URL));
$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 = [];
Expand Down Expand Up @@ -45,7 +45,10 @@ function common_header(string $description): void {
]);
}

function message($code, $language = 'en', array $interpolations = []): string
/**
* @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')) {
Expand Down
50 changes: 34 additions & 16 deletions public/releases/8.6/languages/en.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

'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>',
'features_readonly_property_defaults_description' => '<p>Allows default values for instance readonly properties.</p>',
'features_polling_api_description' => '<p>The new API is available at the user-code level, allowing low-level frameworks such as ReactPHP or Amp to utilize it.</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>SortDirection is an enum with exactly two cases (Ascending and Descending) and no associated behavior.</p>',
Expand All @@ -26,34 +26,52 @@
'readonly_property_defaults_title' => 'Readonly property defaults',
'readonly_property_defaults_description' => 'Allows default values for instance readonly properties.',
'polling_api_title' => 'Polling API',
'polling_api_description' => 'The new API is available at the user-code level, allowing low-level frameworks such as ReactPHP or Amp to utilize it.',
'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>SortDirection is an enum with exactly two cases (Ascending and Descending) and no associated behavior.</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' => 'TODO.',
'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' => 'TODO.',
'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' => 'TODO.',
'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_uri' => 'New <code>Uri\Rfc3986\Uri::getUriType()</code>, <code>Uri\WhatWg\Url::isSpecialScheme()</code>, <code>Uri\Rfc3986\Uri::getHostType()</code>, and <code>Uri\WhatWg\Url::getHostType()</code> methods.',
'new_gmp' => 'New <code>gmp_powm_sec()</code> and <code>gmp_prevprime()</code> functions.',
'new_intl' => 'New <code>grapheme_strrev()</code> function, and <code>IntlDatePatternGenerator::getSkeleton()</code>, <code>IntlDatePatternGenerator::getBaseSkeleton()</code>, <code>Locale::getDisplayKeyword()</code>, <code>Locale::getDisplayKeywordValue()</code>, <code>SpoofChecker::areBidiConfusable()</code>, <code>SpoofChecker::getBidiSkeleton()</code>, <code>SpoofChecker::getSkeleton()</code> methods.',
'new_mysqli' => 'New <code>mysqli::quote_string()</code> method and <code>mysqli_quote_string()</code> function.',
'new_reflection' => 'New <code>ReflectionConstant::inNamespace()</code>, <code>ReflectionAttribute::inNamespace()</code>, <code>ReflectionAttribute::getNamespaceName()</code>, and <code>ReflectionAttribute::getShortName()</code> methods.',
'new_zip' => 'New <code>ZipArchive::openString()</code> and <code>ZipArchive::closeString()</code> methods.',
'new_stream' => 'New <code>stream_last_errors()</code> and <code>stream_clear_errors()</code> functions.',
'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-&gt;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>&lt;</code> and <code>&gt;</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',
'deprecated_mysqli' => 'The <code>mysqli_get_charset()</code> function and <code>mysqli::get_charset()</code> method are now deprecated.',
'deprecated_spl' => 'The <code>spl_classes()</code>, <code>spl_object_hash()</code> functions, and various <code>ArrayIterator</code> and <code>SplFileObject</code> methods are now deprecated.',
'deprecated_standard' => 'The <code>metaphone()</code>, <code>is_double()</code>, <code>is_long()</code>, <code>is_integer()</code>, <code>doubleval()</code>, and <code>strcoll()</code> functions are now deprecated.',
'deprecated_date' => 'The <code>DateTime::createFromInterface()</code>, <code>DateTimeImmutable::__set_state()</code>, <code>DateTimeImmutable::modify()</code>, <code>DateTimeImmutable::add()</code>, <code>DateTimeImmutable::sub()</code>, <code>DateTimeImmutable::setTimezone()</code>, <code>DateTimeImmutable::setTime()</code>, <code>DateTimeImmutable::setDate()</code>, <code>DateTimeImmutable::setISODate()</code>, <code>DateTimeImmutable::setTimestamp()</code>, <code>DateTimeImmutable::createFromInterface()</code>, <code>DateTimeZone::__set_state()</code>, <code>DateInterval::__set_state()</code>, <code>DatePeriod::__set_state()</code> methods now have tentative static return types.',
'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>',
Expand Down
Loading
Loading