From 26141911a34f3d65a89d43d67679a157b6b39663 Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Thu, 25 Sep 2025 19:18:38 +0300 Subject: [PATCH 1/9] Add PHP 8.5 release page --- images/php8/logo_php8_5.svg | 9 ++ releases/8.5/common.php | 70 ++++++++++++++++ releases/8.5/en.php | 5 ++ releases/8.5/index.php | 13 +++ releases/8.5/languages/en.php | 23 +++++ releases/8.5/release.inc | 154 ++++++++++++++++++++++++++++++++++ 6 files changed, 274 insertions(+) create mode 100644 images/php8/logo_php8_5.svg create mode 100644 releases/8.5/common.php create mode 100644 releases/8.5/en.php create mode 100644 releases/8.5/index.php create mode 100644 releases/8.5/languages/en.php create mode 100644 releases/8.5/release.inc 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..bb9fa77208 --- /dev/null +++ b/releases/8.5/languages/en.php @@ -0,0 +1,23 @@ + 'PHP 8.5 is a major update of the PHP language. It contains many new features, such as Pipe operator, Final Property Promotion, Attributes on Constants, 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 Pipe operator, Final Property Promotion, Attributes on Constants, 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.', + + 'new_classes_title' => 'New Classes, Interfaces, and Functions', + 'new_core_attributes' => '#[\NoDiscard] and #[\DelayedTargetValidation] attributes', + + '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..4afcc2449a --- /dev/null +++ b/releases/8.5/release.inc @@ -0,0 +1,154 @@ + +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+

+ + RFC +

+
+
+
PHP < 8.5
+
+ +
+
+
+
+
PHP 8.5
+
+ trim(...) + |> fn (string $string) => str_replace(' ', '-', $string) + |> fn (string $string) => str_replace(['.', '/', '…'], '', $string) + |> strtolower(...); +PHP + ); ?> +
+
+
+
+ +
+

+ + RFC +

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

+
+
    + +
+
+
+ +
+

+
+
    + +
+
+
+
+ + + + Date: Wed, 1 Oct 2025 13:10:35 +0300 Subject: [PATCH 2/9] wip --- releases/8.5/languages/en.php | 11 +- releases/8.5/release.inc | 418 +++++++++++++++++++++++++++++++++- 2 files changed, 416 insertions(+), 13 deletions(-) diff --git a/releases/8.5/languages/en.php b/releases/8.5/languages/en.php index bb9fa77208..5d0dca4f36 100644 --- a/releases/8.5/languages/en.php +++ b/releases/8.5/languages/en.php @@ -11,9 +11,18 @@ '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', + 'final_promotion_title' => 'Final Property Promotion', + 'attributes_on_constants_title' => 'Attributes on Constants', + 'override_properties_title' => 'Attribute #[\Override] extended to target properties', + 'static_aviz_title' => 'Asymmetric Visibility for Static Properties', + 'deprecated_traits_title' => 'Attribute #[\Deprecated] available for traits', 'new_classes_title' => 'New Classes, Interfaces, and Functions', - 'new_core_attributes' => '#[\NoDiscard] and #[\DelayedTargetValidation] attributes', 'bc_title' => 'Deprecations and backward compatibility breaks', diff --git a/releases/8.5/release.inc b/releases/8.5/release.inc index 4afcc2449a..94f0f9cedc 100644 --- a/releases/8.5/release.inc +++ b/releases/8.5/release.inc @@ -36,7 +36,76 @@ common_header(message('common_header', $lang));
-

+

+ + RFC +

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

+ + RFC +

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

RFC

@@ -70,8 +139,8 @@ $input = ' Some kind of string. '; $output = $input |> trim(...) - |> fn (string $string) => str_replace(' ', '-', $string) - |> fn (string $string) => str_replace(['.', '/', '…'], '', $string) + |> (fn (string $string) => str_replace(' ', '-', $string)) + |> (fn (string $string) => str_replace(['.', '/', '…'], '', $string)) |> strtolower(...); PHP ); ?> @@ -81,9 +150,9 @@ PHP
-

- - RFC +

+ + RFC

@@ -91,9 +160,38 @@ PHP
+
+
+
+
+
PHP 8.5
+
+ +
+
+
+
+ +
+

+ + RFC +

+
+
+
PHP < 8.5
+
+ @@ -105,16 +203,306 @@ PHP
+
+
+
+
-var_dump($uri->getHost()); // string(7) "php.net" +
+

+ + 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
+
+ +
+
+
+
+
PHP 8.5
+
+ +
+
+
+
+ +
+

+ + RFC +

+
+
+
PHP < 8.5
+
+ version); // Fatal error: Cannot use the final modifier on a parameter +PHP + + ); ?> +
+
+
+
+
PHP 8.5
+
+ version); // string(7) "PHP 8.5" +PHP + ); ?> +
+
+
+
+ +
+

+ + RFC +

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

+ + RFC +

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

+ + RFC +

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

+ + RFC +

+
+
+
PHP < 8.5
+
+ +
+
+
+
+
PHP 8.5
+
+ +
+
@@ -124,7 +512,13 @@ PHP

From 5fc81d68e403d23e6af0972351364497fe6da718 Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Wed, 1 Oct 2025 15:55:28 +0300 Subject: [PATCH 3/9] wip --- releases/8.5/release.inc | 65 ++++++++++++++++++++++++++++++++-------- 1 file changed, 53 insertions(+), 12 deletions(-) diff --git a/releases/8.5/release.inc b/releases/8.5/release.inc index 94f0f9cedc..f697a54394 100644 --- a/releases/8.5/release.inc +++ b/releases/8.5/release.inc @@ -48,7 +48,8 @@ common_header(message('common_header', $lang)); <<<'PHP' $components = parse_url("https://php.net/releases/8.5/en.php"); -var_dump($components['host']); // string(7) "php.net" +var_dump($components['host']); +// string(7) "php.net" PHP ); ?> @@ -62,7 +63,8 @@ PHP <<<'PHP' $uri = new Uri\Rfc3986\Uri("https://php.net/releases/8.5/en.php"); -var_dump($uri->getHost()); // string(7) "php.net" +var_dump($uri->getHost()); +// string(7) "php.net" PHP ); ?> @@ -84,7 +86,20 @@ PHP
version = $version; + + return $newObject; + } +} + +var_dump(new PhpVersion()->withVersion('PHP 8.5')); PHP ); ?> @@ -96,7 +111,17 @@ PHP
$version]); + } +} + +var_dump(new PhpVersion()->withVersion('PHP 8.5')); PHP ); ?>
@@ -160,7 +185,11 @@ PHP
@@ -172,7 +201,13 @@ PHP
@@ -259,7 +294,8 @@ PHP <<<'PHP' $versions = ['PHP 8.1', 'PHP 8.2', 'PHP 8.3', 'PHP 8.4', 'PHP 8.5']; -var_dump($versions[array_key_first($versions)]); // string(7) "PHP 8.1" +var_dump($versions[array_key_first($versions)]); +// string(7) "PHP 8.1" PHP ); ?> @@ -273,7 +309,8 @@ PHP <<<'PHP' $versions = ['PHP 8.1', 'PHP 8.2', 'PHP 8.3', 'PHP 8.4', 'PHP 8.5']; -var_dump(array_first($versions)); // string(7) "PHP 8.1" +var_dump(array_first($versions)); +// string(7) "PHP 8.1" PHP ); ?>
@@ -300,7 +337,8 @@ class PhpVersion { } } -var_dump(new PhpVersion()->version); // Fatal error: Cannot use the final modifier on a parameter +var_dump(new PhpVersion()->version); +// Fatal error: Cannot use the final modifier on a parameter PHP ); ?> @@ -320,7 +358,8 @@ class PhpVersion { } } -var_dump(new PhpVersion()->version); // string(7) "PHP 8.5" +var_dump(new PhpVersion()->version); +// string(7) "PHP 8.5" PHP ); ?>
@@ -344,7 +383,8 @@ PHP #[NewFeatures] const VERSION = '8.4'; -var_dump(VERSION); // Parse error: syntax error, unexpected token "const" +var_dump(VERSION); +// Parse error: syntax error, unexpected token "const" PHP ); ?> @@ -361,7 +401,8 @@ PHP #[NewFeatures] const VERSION = '8.5'; -var_dump(VERSION); // string(3) "8.5" +var_dump(VERSION); +// string(3) "8.5" PHP ); ?> From 10270016e46f74e79f59210c6ea8e84204f834ba Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Fri, 3 Oct 2025 20:59:54 +0300 Subject: [PATCH 4/9] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Tim Düsterhus --- releases/8.5/languages/en.php | 8 +- releases/8.5/release.inc | 237 +++++++--------------------------- 2 files changed, 52 insertions(+), 193 deletions(-) diff --git a/releases/8.5/languages/en.php b/releases/8.5/languages/en.php index 5d0dca4f36..fd084ded5c 100644 --- a/releases/8.5/languages/en.php +++ b/releases/8.5/languages/en.php @@ -1,10 +1,10 @@ 'PHP 8.5 is a major update of the PHP language. It contains many new features, such as Pipe operator, Final Property Promotion, Attributes on Constants, performance improvements, bug fixes, and general cleanup.', + 'common_header' => '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 Pipe operator, Final Property Promotion, Attributes on Constants, performance improvements, bug fixes, and general cleanup.', + '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', @@ -16,10 +16,6 @@ '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', - 'final_promotion_title' => 'Final Property Promotion', - 'attributes_on_constants_title' => 'Attributes on Constants', - 'override_properties_title' => 'Attribute #[\Override] extended to target properties', - 'static_aviz_title' => 'Asymmetric Visibility for Static Properties', 'deprecated_traits_title' => 'Attribute #[\Deprecated] available for traits', 'new_classes_title' => 'New Classes, Interfaces, and Functions', diff --git a/releases/8.5/release.inc b/releases/8.5/release.inc index f697a54394..eb0bfa3711 100644 --- a/releases/8.5/release.inc +++ b/releases/8.5/release.inc @@ -61,7 +61,9 @@ PHP
getHost()); // string(7) "php.net" @@ -86,9 +88,9 @@ PHP
withVersion('PHP 8.5')); +// Fatal error: Uncaught Error: Cannot modify readonly property PhpVersion::$version PHP ); ?> @@ -111,9 +114,9 @@ PHP
withVersion('PHP 8.5')); +$version = new PhpVersion(); + +var_dump( + $version->withVersion('PHP 8.5'), + $version->version, +); PHP ); ?>
@@ -219,6 +227,7 @@ PHP

RFC + RFC

@@ -226,7 +235,23 @@ PHP
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 ); ?> @@ -238,7 +263,20 @@ PHP
@@ -318,185 +356,6 @@ PHP
-
-

- - RFC -

-
-
-
PHP < 8.5
-
- version); -// Fatal error: Cannot use the final modifier on a parameter -PHP - - ); ?> -
-
-
-
-
PHP 8.5
-
- version); -// string(7) "PHP 8.5" -PHP - ); ?> -
-
-
-
- -
-

- - RFC -

-
-
-
PHP < 8.5
-
- -
-
-
-
-
PHP 8.5
-
- -
-
-
-
- -
-

- - RFC -

-
-
-
PHP < 8.5
-
- -
-
-
-
-
PHP 8.5
-
- -
-
-
-
- -
-

- - RFC -

-
-
-
PHP < 8.5
-
- -
-
-
-
-
PHP 8.5
-
- -
-
-
-
-

@@ -553,6 +412,10 @@ PHP

    +
  • Property Promotion is now available for final
  • +
  • Attributes are now available for constants
  • +
  • Attribute #[\Override] now works on properties
  • +
  • Asymmetric Visibility for Static Properties
  • New #[\DelayedTargetValidation] attribute is available
  • New get_error_handler(), get_exception_handler() functions, and Closure::getCurrent method are available.
  • New Dom\Element::getElementsByClassName() and Dom\Element::insertAdjacentHTML() methods are available.
  • From 4c0fe2b3b2694fcb758f80aa9f89a435a2a4c88c Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Fri, 3 Oct 2025 21:06:25 +0300 Subject: [PATCH 5/9] wip --- releases/8.5/languages/en.php | 2 +- releases/8.5/release.inc | 72 +++++++++-------------------------- 2 files changed, 19 insertions(+), 55 deletions(-) diff --git a/releases/8.5/languages/en.php b/releases/8.5/languages/en.php index fd084ded5c..bc46e46c6c 100644 --- a/releases/8.5/languages/en.php +++ b/releases/8.5/languages/en.php @@ -16,7 +16,7 @@ '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', - 'deprecated_traits_title' => 'Attribute #[\Deprecated] available for traits', + 'deprecated_traits_title' => '', 'new_classes_title' => 'New Classes, Interfaces, and Functions', diff --git a/releases/8.5/release.inc b/releases/8.5/release.inc index eb0bfa3711..5bcd54a186 100644 --- a/releases/8.5/release.inc +++ b/releases/8.5/release.inc @@ -238,9 +238,16 @@ PHP final class CalculatorTest extends \PHPUnit\Framework\TestCase { #[DataProvider('subtractionProvider')] - public function testSubtraction(int $minuend, int $subtrahend, int $result): void + public function testSubtraction( + int $minuend, + int $subtrahend, + int $result + ): void { - $this->assertSame($result, Calculator::subtract($minuend, $subtrahend)); + $this->assertSame( + $result, + Calculator::subtract($minuend, $subtrahend) + ); } public static function subtractionProvider(): iterable @@ -272,9 +279,15 @@ final class CalculatorTest yield [0, $i, ($i * -1)]; } })] - public function testSubtraction(int $minuend, int $subtrahend, int $result) + public function testSubtraction( + int $minuend, + int $subtrahend, + int $result + ) { - \assert(Calculator::subtract($minuend, $subtrahend) === $result); + \assert( + Calculator::subtract($minuend, $subtrahend) === $result + ); } } PHP @@ -349,56 +362,6 @@ $versions = ['PHP 8.1', 'PHP 8.2', 'PHP 8.3', 'PHP 8.4', 'PHP 8.5']; var_dump(array_first($versions)); // string(7) "PHP 8.1" -PHP - ); ?> -
-
-
-
- -
-

- - RFC -

-
-
-
PHP < 8.5
-
- -
-
-
-
-
PHP 8.5
-
-
@@ -415,6 +378,7 @@ 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, and Closure::getCurrent method are available.
  • From 6e7045fb76c71407b31f728f0cd4be45f271329f Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Fri, 3 Oct 2025 23:21:54 +0300 Subject: [PATCH 6/9] wip --- releases/8.5/release.inc | 68 +++++++++++++++++++++++++++++++++++----- 1 file changed, 60 insertions(+), 8 deletions(-) diff --git a/releases/8.5/release.inc b/releases/8.5/release.inc index 5bcd54a186..6ea3dac395 100644 --- a/releases/8.5/release.inc +++ b/releases/8.5/release.inc @@ -309,7 +309,22 @@ PHP
    @@ -321,7 +336,21 @@ PHP
    @@ -343,10 +372,22 @@ PHP
    ['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($versions[array_key_first($versions)]); -// string(7) "PHP 8.1" +var_dump($upcomingRelease); PHP ); ?> @@ -358,10 +399,21 @@ PHP
    ['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(array_first($versions)); -// string(7) "PHP 8.1" +var_dump($upcomingRelease); PHP ); ?>
    From b65585643dd0d75709755b7c9f4f0454591450c1 Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Sun, 5 Oct 2025 19:54:09 +0300 Subject: [PATCH 7/9] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Tim Düsterhus --- releases/8.5/release.inc | 52 +++++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 19 deletions(-) diff --git a/releases/8.5/release.inc b/releases/8.5/release.inc index 6ea3dac395..3a833189ba 100644 --- a/releases/8.5/release.inc +++ b/releases/8.5/release.inc @@ -101,7 +101,12 @@ final readonly class PhpVersion { } } -var_dump(new PhpVersion()->withVersion('PHP 8.5')); +$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 @@ -120,16 +125,22 @@ final readonly class PhpVersion { ) {} public function withVersion(string $version) { - return clone($this, ['version' => $version]); + return clone($this, [ + 'version' => $version, + ]); } } $version = new PhpVersion(); -var_dump( - $version->withVersion('PHP 8.5'), - $version->version, -); +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 ); ?>
    @@ -157,6 +168,9 @@ $output = strtolower( ) ) ); + +var_dump($output); +// string(19) "some-kind-of-string" PHP ); ?> @@ -175,6 +189,9 @@ $output = $input |> (fn (string $string) => str_replace(' ', '-', $string)) |> (fn (string $string) => str_replace(['.', '/', '…'], '', $string)) |> strtolower(...); + +var_dump($output); +// string(19) "some-kind-of-string" PHP ); ?>
    @@ -193,7 +210,8 @@ PHP
    @@ -348,9 +364,6 @@ curl_exec($ch1); $ch2 = curl_init('https://thephp.foundation/'); curl_setopt($ch2, CURLOPT_SHARE, $sh); curl_exec($ch2); - -curl_close($ch1); -curl_close($ch2); PHP ); ?>
    @@ -429,11 +442,12 @@ 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
    • +
    • 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, and Closure::getCurrent method are 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.
    • From 7301dd8f1a29e04374f3bcf5e6f5f41530c950a5 Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Sun, 5 Oct 2025 21:15:27 +0300 Subject: [PATCH 8/9] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Tim Düsterhus --- releases/8.5/languages/en.php | 1 - releases/8.5/release.inc | 18 ++++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/releases/8.5/languages/en.php b/releases/8.5/languages/en.php index bc46e46c6c..a0c2f2e947 100644 --- a/releases/8.5/languages/en.php +++ b/releases/8.5/languages/en.php @@ -16,7 +16,6 @@ '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', - 'deprecated_traits_title' => '', 'new_classes_title' => 'New Classes, Interfaces, and Functions', diff --git a/releases/8.5/release.inc b/releases/8.5/release.inc index 3a833189ba..00545de762 100644 --- a/releases/8.5/release.inc +++ b/releases/8.5/release.inc @@ -88,12 +88,14 @@ PHP
      version = $version; @@ -119,12 +121,14 @@ PHP
      $version, ]); @@ -186,8 +190,8 @@ $input = ' Some kind of string. '; $output = $input |> trim(...) - |> (fn (string $string) => str_replace(' ', '-', $string)) - |> (fn (string $string) => str_replace(['.', '/', '…'], '', $string)) + |> (fn($string) => str_replace(' ', '-', $string)) + |> (fn($string) => str_replace(['.', '/', '…'], '', $string)) |> strtolower(...); var_dump($output); @@ -339,8 +343,6 @@ curl_exec($ch1); $ch2 = curl_init('https://thephp.foundation/'); curl_setopt($ch2, CURLOPT_SHARE, $sh); curl_exec($ch2); - -curl_share_close($sh); PHP ); ?> From d5253792cb66a3e1517eba9c59a8b45742b800e3 Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Sun, 5 Oct 2025 21:19:00 +0300 Subject: [PATCH 9/9] cs --- releases/8.5/release.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/releases/8.5/release.inc b/releases/8.5/release.inc index 00545de762..e491fa612a 100644 --- a/releases/8.5/release.inc +++ b/releases/8.5/release.inc @@ -295,7 +295,8 @@ PHP <<<'PHP' final class CalculatorTest { - #[Test\CaseGenerator(static function (): iterable { + #[Test\CaseGenerator(static function (): iterable + { for ($i = -10; $i <= 10; $i++) { yield [$i, $i, 0]; yield [$i, 0, $i];