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..a0c2f2e947 --- /dev/null +++ b/releases/8.5/languages/en.php @@ -0,0 +1,27 @@ + 'PHP 8.5 is a major update of the PHP language. It contains many new features, such as the new URI extension, support for modifying properties while cloning, the Pipe operator, performance improvements, bug fixes, and general cleanup.', + 'documentation' => 'Doc', + 'main_title' => 'Released!', + 'main_subtitle' => 'PHP 8.5 is a major update of the PHP language.
It contains many new features, such as the new URI extension, support for modifying properties while cloning, the Pipe operator, performance improvements, bug fixes, and general cleanup.', + 'upgrade_now' => 'Upgrade to PHP 8.5 now!', + + 'pipe_operator_title' => 'Pipe operator', + 'url_parsing_api_title' => 'Add RFC 3986 and WHATWG URL compliant API', + 'url_parsing_api_description' => 'Uri\UriException, Uri\InvalidUriException, Uri\UriComparisonMode, + Uri\Rfc3986\Uri, Uri\WhatWg\InvalidUrlException, Uri\WhatWg\UrlValidationErrorType, Uri\WhatWg\UrlValidationError, and Uri\WhatWg\Url are now available.', + 'clone_with_title' => 'Clone with v2', + 'no_discard_title' => 'New #[\NoDiscard] Attribute', + 'fcc_in_const_expr_title' => 'First Class Callables in constant expressions', + 'curl_share_persistence_improvement_title' => 'Persistent cURL share handle improvement', + 'array_first_last_title' => 'New array_first() and array_last() functions', + + 'new_classes_title' => 'New Classes, Interfaces, and Functions', + + 'bc_title' => 'Deprecations and backward compatibility breaks', + + 'footer_title' => 'Better performance, better syntax, improved type safety.', + 'footer_description' => '

For source downloads of PHP 8.5 please visit the downloads page. Windows binaries can be found on the PHP for Windows site. The list of changes is recorded in the ChangeLog.

+

The migration guide is available in the PHP Manual. Please consult it 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..e491fa612a --- /dev/null +++ b/releases/8.5/release.inc @@ -0,0 +1,485 @@ + +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+

+ + RFC +

+
+
+
PHP < 8.5
+
+ +
+
+
+
+
PHP 8.5
+
+ getHost()); +// string(7) "php.net" +PHP + ); ?> +
+
+
+
+ +
+
+ +
+

+ + RFC +

+
+
+
PHP < 8.5
+
+ version = $version; + + return $newObject; + } +} + +$version = new PhpVersion(); + +var_dump($version->version); +// string(7) "PHP 8.4" + +var_dump($version->withVersion('PHP 8.5')->version); +// Fatal error: Uncaught Error: Cannot modify readonly property PhpVersion::$version +PHP + + ); ?> +
+
+
+
+
PHP 8.5
+
+ $version, + ]); + } +} + +$version = new PhpVersion(); + +var_dump($version->version); +// string(7) "PHP 8.4" + +var_dump($version->withVersion('PHP 8.5')->version); +// string(7) "PHP 8.5" + +var_dump($version->version); +// string(7) "PHP 8.4" +PHP + ); ?> +
+
+
+
+ +
+

+ + RFC +

+
+
+
PHP < 8.5
+
+ +
+
+
+
+
PHP 8.5
+
+ trim(...) + |> (fn($string) => str_replace(' ', '-', $string)) + |> (fn($string) => str_replace(['.', '/', '…'], '', $string)) + |> strtolower(...); + +var_dump($output); +// string(19) "some-kind-of-string" +PHP + ); ?> +
+
+
+
+ +
+

+ + RFC +

+
+
+
PHP < 8.5
+
+ +
+
+
+
+
PHP 8.5
+
+ +
+
+
+
+ +
+

+ + RFC + RFC +

+
+
+
PHP < 8.5
+
+ assertSame( + $result, + Calculator::subtract($minuend, $subtrahend) + ); + } + + public static function subtractionProvider(): iterable + { + for ($i = -10; $i <= 10; $i++) { + yield [$i, $i, 0]; + yield [$i, 0, $i]; + yield [0, $i, -$i]; + } + } +} +PHP + + ); ?> +
+
+
+
+
PHP 8.5
+
+ +
+
+
+
+ +
+

+ + RFC + RFC +

+
+
+
PHP < 8.5
+
+ +
+
+
+
+
PHP 8.5
+
+ +
+
+
+
+ New CurlSharePersistentHandle class, curl_multi_get_handles(), curl_share_init_persistent() functions are available. +
+
+ +
+

+ + RFC +

+
+
+
PHP < 8.5
+
+ ['state' => 'security', 'branch' => 'PHP-8.2'], + 'php-83' => ['state' => 'active', 'branch' => 'PHP-8.3'], + 'php-84' => ['state' => 'active', 'branch' => 'PHP-8.4'], + 'php-85' => ['state' => 'upcoming', 'branch' => 'PHP-8.5'], +]; + +$upcomingRelease = null; +foreach ($php as $key => $version) { + if ($version['state'] === 'upcoming') { + $upcomingRelease = $version; + break; + } +} + +var_dump($upcomingRelease); +PHP + + ); ?> +
+
+
+
+
PHP 8.5
+
+ ['state' => 'security', 'branch' => 'PHP-8.2'], + 'php-83' => ['state' => 'active', 'branch' => 'PHP-8.3'], + 'php-84' => ['state' => 'active', 'branch' => 'PHP-8.4'], + 'php-85' => ['state' => 'upcoming', 'branch' => 'PHP-8.5'], +]; + +$upcomingRelease = array_first( + array_filter( + $php, + static fn($version) => $version['state'] === 'upcoming' + ) +); + +var_dump($upcomingRelease); +PHP + ); ?> +
+
+
+
+
+ +
+
+

+
+
    +
  • Property Promotion is now available for final
  • +
  • Attributes are now available for constants
  • +
  • Attribute #[\Override] now works on properties
  • +
  • Attribute #[\Deprecated] available for traits
  • +
  • Asymmetric Visibility for Static Properties
  • +
  • New #[\DelayedTargetValidation] attribute is available
  • +
  • New get_error_handler(), get_exception_handler() functions are available.
  • +
  • New Closure::getCurrent method is available.
  • +
  • New Dom\Element::getElementsByClassName() and Dom\Element::insertAdjacentHTML() methods are available.
  • +
  • New enchant_dict_remove_from_session() and enchant_dict_remove() functions are available.
  • +
  • New grapheme_levenshtein() function is available.
  • +
  • New opcache_is_script_cached_in_file_cache() function is available.
  • +
  • New ReflectionConstant::getFileName(), ReflectionConstant::getExtension(), ReflectionConstant::getExtensionName(), ReflectionConstant::getAttributes(), and ReflectionProperty::getMangledName() methods are available.
  • +
+
+
+ +
+

+
+
    + +
+
+
+
+ + + +