diff --git a/images/php8/logo_php8_5.svg b/images/php8/logo_php8_5.svg new file mode 100644 index 0000000000..befa8d9efe --- /dev/null +++ b/images/php8/logo_php8_5.svg @@ -0,0 +1,9 @@ + diff --git a/releases/8.5/common.php b/releases/8.5/common.php new file mode 100644 index 0000000000..ef05a2a1fb --- /dev/null +++ b/releases/8.5/common.php @@ -0,0 +1,70 @@ + 'English', +]; + +function common_header(string $description): void { + global $MYSITE; + + $meta_image_path = \htmlspecialchars( + \filter_var($MYSITE . 'images/php8/php_8_5_released.png', \FILTER_VALIDATE_URL)); + $meta_description = \htmlspecialchars($description); + + \site_header("PHP 8.5 Release Announcement", [ + 'current' => 'php8', + 'css' => ['php8.css'], + 'meta_tags' => << + + + + + + + + + + + + +META + ]); +} + +function language_chooser(string $currentLang): void { + // Print out the form with all the options + echo ' +
+'; +} + +function message($code, $language = 'en') +{ + $original = require __DIR__ . '/languages/en.php'; + if (($language !== 'en') && file_exists(__DIR__ . '/languages/' . $language . '.php')) { + $translation = require __DIR__ . '/languages/' . $language . '.php'; + } + + return $translation[$code] ?? $original[$code] ?? $code; +} diff --git a/releases/8.5/en.php b/releases/8.5/en.php new file mode 100644 index 0000000000..7ff380e63b --- /dev/null +++ b/releases/8.5/en.php @@ -0,0 +1,5 @@ +chooseCode("", "", $_SERVER['HTTP_ACCEPT_LANGUAGE']); + +mirror_redirect("/releases/8.5/$lang.php"); diff --git a/releases/8.5/languages/en.php b/releases/8.5/languages/en.php new file mode 100644 index 0000000000..7f3011b05c --- /dev/null +++ b/releases/8.5/languages/en.php @@ -0,0 +1,31 @@ + 'PHP 8.5 is a major update of the PHP language, with new features including the Pipe Operator, URI extension, and support for modifying properties while cloning.', + 'documentation' => 'Doc', + 'main_title' => 'Released!', + 'main_subtitle' => 'PHP 8.5 is a major update of the PHP language, with new features including the Pipe Operator, URI extension, and support for modifying properties while cloning.', + 'upgrade_now' => 'Upgrade to PHP 8.5', + + 'pipe_operator_title' => 'Pipe Operator', + 'pipe_operator_description' => 'The pipe operator allows chaining function calls together without dealing with intermediary variables. This enables replacing many "nested calls" with a chain that can be read forwards, rather than inside-out.
Learn more about the backstory of this feature in The PHP Foundation’s blog.
', + 'uri_extension_title' => 'URI Extension', + 'uri_extension_description' => 'The new always-available URI extension provides APIs to securely parse and modify URIs and URLs according to the RFC 3986 and the WHATWG URL standards.
Powered by the uriparser (RFC 3986) and Lexbor (WHATWG URL) libraries.
Learn more about the backstory of this feature in The PHP Foundation’s blog.
', + 'clone_with_title' => 'Clone With', + 'clone_with_description' => 'It is now possible to update properties during object cloning by passing an associative array to theclone() function. This enables straightforward support of the "with-er" pattern for readonly classes.',
+ 'no_discard_title' => '#[\NoDiscard] Attribute',
+ 'no_discard_description' => 'By adding the #[\NoDiscard] attribute to a function, PHP will check whether the returned value is consumed and emit a warning if it is not. This allows improving the safety of APIs where the returned value is important, but it\'s easy to forget using the return value by accident.
The associated (void) cast can be used to indicate that a value is intentionally unused.
array_first() and array_last() functions',
+ 'fcc_in_const_expr_title' => 'Closures and First-Class Callables in Constant Expressions',
+ 'fcc_in_const_expr_description' => 'Static closures and first-class callables can now be used in constant expressions. This includes attribute parameters, default values of properties and parameters, and constants.',
+ 'persistent_curl_share_handles_title' => 'Persistent cURL Share Handles',
+ 'persistent_curl_share_handles_description' => 'Unlike curl_share_init(), handles created by curl_share_init_persistent() will not be destroyed at the end of the PHP request. If a persistent share handle with the same set of share options is found, it will be reused, avoiding the cost of initializing cURL handles each time.',
+
+ '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' => 'The full list of changes is recorded in the ChangeLog.
+Please consult the Migration Guide for a detailed list of new features and backward-incompatible changes.
', +]; diff --git a/releases/8.5/release.inc b/releases/8.5/release.inc new file mode 100644 index 0000000000..460b26399a --- /dev/null +++ b/releases/8.5/release.inc @@ -0,0 +1,441 @@ + +#[\Override] attribute can now be applied to properties.#[\Deprecated] attribute can be used on traits and constants.final using constructor property promotion.Closure::getCurrent() method to simplify recursion in anonymous functions.setcookie() and setrawcookie() now support the "partitioned" key.get_error_handler() and get_exception_handler() functions are available.Dom\Element::getElementsByClassName() and Dom\Element::insertAdjacentHTML() methods are available.grapheme_levenshtein() function.#[\DelayedTargetValidation] attribute can be used to suppress compile-time errors from core and extension attributes that are used on invalid targets.shell_exec() has been deprecated.(boolean), (integer), (double), and (binary) have been deprecated. Use (bool), (int), (float), and (string) instead, respectively.disable_classes INI setting has been removed as it causes various engine assumptions to be broken.null as an array offset or when calling array_key_exists() is now deprecated. Use an empty string instead.class_alias().__sleep() and __wakeup() magic methods have been soft-deprecated. The __serialize() and __unserialize() magic methods should be used instead.NAN to other types.int if they cannot be represented as one.