Skip to content
Draft
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: 9 additions & 0 deletions public/images/php8/logo_php8_6.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/php8/php_8_6_released.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 62 additions & 0 deletions public/releases/8.6/common.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?php

declare(strict_types=1);

namespace releases\php86;

require_once __DIR__ . '/../../../include/prepend.inc';

const LANGUAGES = [
'en' => 'English',
];

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));

Check failure on line 17 in public/releases/8.6/common.php

View workflow job for this annotation

GitHub Actions / Static Analysis (8.4, locked)

Parameter #1 $string of function htmlspecialchars expects string, string|false given.
$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,
'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
]);
}

function message($code, $language = 'en', array $interpolations = []): string

Check failure on line 48 in public/releases/8.6/common.php

View workflow job for this annotation

GitHub Actions / Static Analysis (8.4, locked)

Function releases\php86\message() has parameter $language with no type specified.

Check failure on line 48 in public/releases/8.6/common.php

View workflow job for this annotation

GitHub Actions / Static Analysis (8.4, locked)

Function releases\php86\message() has parameter $interpolations with no value type specified in iterable type array.

Check failure on line 48 in public/releases/8.6/common.php

View workflow job for this annotation

GitHub Actions / Static Analysis (8.4, locked)

Function releases\php86\message() has parameter $code with no type specified.
{
$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;
}
5 changes: 5 additions & 0 deletions public/releases/8.6/en.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

$lang = 'en';

require_once __DIR__ . '/release.inc';
13 changes: 13 additions & 0 deletions public/releases/8.6/index.php
Original file line number Diff line number Diff line change
@@ -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");
41 changes: 41 additions & 0 deletions public/releases/8.6/languages/en.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php

return [
'common_header' => 'PHP 8.6 is a major update of the PHP language, with new features including the Polling API, Partial Function Application',
'main_title' => 'Smarter, Faster, Built for Tomorrow.',
'main_subtitle' => '<p><strong>PHP 8.6 is a major update of the PHP language</strong>, with new features including the <strong>Polling API</strong>, <strong>Partial Function Application</strong></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' => '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>',

'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_clamp_description' => '<p>Ensures that a given value (numeric or otherwise) falls within a specified range.</p>',
'features_duration_description' => '<p>Represents a duration of time.</p>',
'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.',
'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.',
'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' => 'Represents a duration of time.',
'sort_direction_title' => 'New <code>SortDirection</code> enum',
'sort_direction_description' => 'Represents a sort directions.',

'new_classes_title' => 'Additional features and improvements',
'bc_title' => 'Deprecations and backward compatibility breaks',
'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>',
];
Loading
Loading