diff --git a/images/php8/logo_php8_3.svg b/images/php8/logo_php8_3.svg new file mode 100644 index 0000000000..ae9af2100d --- /dev/null +++ b/images/php8/logo_php8_3.svg @@ -0,0 +1,9 @@ + diff --git a/images/php8/php_8_3_released.png b/images/php8/php_8_3_released.png new file mode 100644 index 0000000000..f8e4fd786c Binary files /dev/null and b/images/php8/php_8_3_released.png differ diff --git a/releases/8.3/common.php b/releases/8.3/common.php new file mode 100644 index 0000000000..249e08239c --- /dev/null +++ b/releases/8.3/common.php @@ -0,0 +1,75 @@ + 'php8', + 'css' => ['php8.css'], + 'meta_tags' => << + + + + + + + + + + + + +META + ]); +} + +function language_chooser(string $currentLang): void { + $LANGUAGES = [ + 'en' => 'English', + 'ru' => 'Russian', + ]; + + // 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.3/en.php b/releases/8.3/en.php new file mode 100644 index 0000000000..aa9133cd7a --- /dev/null +++ b/releases/8.3/en.php @@ -0,0 +1,5 @@ + 'PHP 8.3 is a major update of the PHP language. It contains many new features, such as explicit typing of class constants, deep-cloning of readonly properties and additions to the randomness functionality. As always it also includes performance improvements, bug fixes and general cleanup.', + 'documentation' => 'Doc', + 'main_title' => 'Released!', + 'main_subtitle' => 'PHP 8.3 is a major update of the PHP language.readonly properties may now be modified once within the magic __clone method to enable deep-cloning of readonly properties.',
+ 'json_validate_title' => 'New json_validate() function',
+ 'json_validate_description' => 'json_validate() allows to check if a string is syntactically valid JSON, while being more efficient than json_decode().',
+ 'typed_class_constants_title' => 'Typed class constants',
+ 'override_title' => 'New #[\Override] attribute',
+ 'override_description' => 'By adding the #[\Override] attribute to a method, PHP will ensure that a method with the same name exists in a parent class or in an implemented interface. Adding the attribute makes it clear that overriding a parent method is intentional and simplifies refactoring, because the removal of an overridden parent method will be detected.',
+ 'randomizer_getbytesfromstring_title' => 'New Randomizer::getBytesFromString() method',
+ 'randomizer_getbytesfromstring_description' => 'The Random Extension that was added in PHP 8.2 was extended by a new method to generate random strings consisting of specific bytes only. This method allows to easily generate random identifiers, such as domain names, and numeric strings of arbitrary length.',
+ 'randomizer_getfloat_nextfloat_title' => 'New Randomizer::getFloat() and Randomizer::nextFloat() methods',
+ 'randomizer_getfloat_nextfloat_description' => 'Due to the limited precision and implicit rounding of floating point numbers, generating an unbiased float lying within a specific interval is non-trivial and the commonly used userland solutions may generate biased results or numbers outside the requested range.
The Randomizer was also extended with two methods to generate random floats in an unbiased fashion. The Randomizer::getFloat() method uses the γ-section algorithm that was published in Drawing Random Floating-Point Numbers from an Interval. Frédéric Goualard, ACM Trans. Model. Comput. Simul., 32:3, 2022.
DOMElement::getAttributeNames(), DOMElement::insertAdjacentElement(), DOMElement::insertAdjacentText(), DOMElement::toggleAttribute(), DOMNode::contains(), DOMNode::getRootNode(), DOMNode::isEqualNode(), DOMNameSpaceNode::contains(), and DOMParentNode::replaceChildren() methods.',
+ 'new_intl' => 'New IntlCalendar::setDate(), IntlCalendar::setDateTime(), IntlGregorianCalendar::createFromDate(), and IntlGregorianCalendar::createFromDateTime() methods.',
+ 'new_ldap' => 'New ldap_connect_wallet(), and ldap_exop_sync() functions.',
+ 'new_mb_str_pad' => 'New mb_str_pad() function.',
+ 'new_posix' => 'New posix_sysconf(), posix_pathconf(), posix_fpathconf(), and posix_eaccess() functions.',
+ 'new_reflection' => 'New ReflectionMethod::createFromMethodName() method.',
+ 'new_socket' => 'New socket_atmark() function.',
+ 'new_str' => 'New str_increment(), str_decrement(), and stream_context_set_options() functions.',
+ 'new_ziparchive' => 'New ZipArchive::getArchiveFlag() method.',
+ 'new_openssl_ec' => 'Support for generation EC keys with custom EC parameters in OpenSSL extension.',
+ 'new_ini' => 'New INI setting zend.max_allowed_stack_size to set the maximum allowed stack size.',
+
+ 'bc_title' => 'Deprecations and backward compatibility breaks',
+ 'bc_datetime' => 'More Appropriate Date/Time Exceptions.',
+ 'bc_arrays' => 'Assigning a negative index n to an empty array will now make sure that the next index is n + 1 instead of 0.',
+ 'bc_range' => 'Changes to the range() function.',
+ 'bc_traits' => 'Changes in re-declaration of static properties in traits.',
+ 'bc_umultipledecimalseparators' => 'The U_MULTIPLE_DECIMAL_SEPERATORS constant is deprecated in favor of U_MULTIPLE_DECIMAL_SEPARATORS.',
+ 'bc_mtrand' => 'The MT_RAND_PHP Mt19937 variant is deprecated.',
+ 'bc_reflection' => 'ReflectionClass::getStaticProperties() is no longer nullable.',
+ 'bc_ini' => 'INI settings assert.active, assert.bail, assert.callback, assert.exception, and assert.warning have been deprecated.',
+
+ 'footer_title' => 'Better performance, better syntax, improved type safety.',
+ 'footer_description' => 'For source downloads of PHP 8.3 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.3/languages/ru.php b/releases/8.3/languages/ru.php new file mode 100644 index 0000000000..cef2e7e8fd --- /dev/null +++ b/releases/8.3/languages/ru.php @@ -0,0 +1,49 @@ + 'PHP 8.3 — большое обновление языка PHP. Оно содержит множество новых возможностей, таких как явная типизация констант классов, глубокое клонирование readonly-свойств, а также улучшения класса Randomizer. Как всегда, в нём также улучшена производительность, исправлены ошибки и многое другое.', + 'documentation' => 'Документация', + 'main_title' => 'выпущен!', + 'main_subtitle' => 'PHP 8.3 — большое обновление языка PHP.readonly) теперь могут быть изменены один раз с помощью магического метода __clone для обеспечения возможности глубокого клонирования readonly-свойств.',
+ 'json_validate_title' => 'Новая функция json_validate()',
+ 'json_validate_description' => 'Функция json_validate() позволяет проверить, является ли строка синтаксически корректным JSON, при этом она более эффективна, чем функция json_decode().',
+ 'typed_class_constants_title' => 'Типизированные константы классов',
+ 'override_title' => 'Новый атрибут #[\Override]',
+ 'override_description' => 'Добавив методу атрибут #[\Override], PHP убедится, что метод с таким же именем существует в родительском классе или в реализованном интерфейсе. Добавление атрибута даёт понять, что переопределение родительского метода является намеренным, а также упрощает рефакторинг, поскольку удаление переопределённого родительского метода будет обнаружено.',
+ 'randomizer_getbytesfromstring_title' => 'Новый метод Randomizer::getBytesFromString()',
+ 'randomizer_getbytesfromstring_description' => 'Модуль Random, добавленный в PHP 8.2, был дополнен новым методом генерации случайных строк, состоящих только из определённых байтов. Этот метод позволяет легко генерировать случайные идентификаторы, например, имена доменов и числовые строки произвольной длины.',
+ 'randomizer_getfloat_nextfloat_title' => 'Новые методы Randomizer::getFloat() и Randomizer::nextFloat()',
+ 'randomizer_getfloat_nextfloat_description' => 'Из-за ограниченной точности и неявного округления чисел с плавающей точкой генерация несмещённого числа, лежащего в определённом интервале, является нетривиальной задачей, а пользовательские решения могут давать смещённые результаты или числа, выходящие за пределы требуемого диапазона.
Класс Randomizer был расширен двумя методами, позволяющими генерировать случайные числа с плавающей точкой несмещённым образом. Метод Randomizer::getFloat() использует алгоритм γ-секции, который был опубликован в Drawing Random Floating-Point Numbers from an Interval. Frédéric Goualard, ACM Trans. Model. Comput. Simul., 32:3, 2022.
DOMElement::getAttributeNames(), DOMElement::insertAdjacentElement(), DOMElement::insertAdjacentText(), DOMElement::toggleAttribute(), DOMNode::contains(), DOMNode::getRootNode(), DOMNode::isEqualNode(), DOMNameSpaceNode::contains() и DOMParentNode::replaceChildren().',
+ 'new_intl' => 'Новые методы IntlCalendar::setDate(), IntlCalendar::setDateTime(), IntlGregorianCalendar::createFromDate() и IntlGregorianCalendar::createFromDateTime().',
+ 'new_ldap' => 'Новые функции ldap_connect_wallet() и ldap_exop_sync().',
+ 'new_mb_str_pad' => 'Новая функция mb_str_pad().',
+ 'new_posix' => 'Новые функции posix_sysconf(), posix_pathconf(), posix_fpathconf() и posix_eaccess().',
+ 'new_reflection' => 'Новый метод ReflectionMethod::createFromMethodName().',
+ 'new_socket' => 'Новая функция socket_atmark().',
+ 'new_str' => 'Новые функции str_increment(), str_decrement() и stream_context_set_options().',
+ 'new_ziparchive' => 'Новый метод ZipArchive::getArchiveFlag().',
+ 'new_openssl_ec' => 'Поддержка генерации EC-ключей с пользовательскими EC-параметрами в модуле OpenSSL.',
+ 'new_ini' => 'Новый параметр INI zend.max_allowed_stack_size для установки максимально допустимого размера стека.',
+
+ 'bc_title' => 'Устаревшая функциональность и изменения в обратной совместимости',
+ 'bc_datetime' => 'Более подходящие исключения в модуле Date/Time.',
+ 'bc_arrays' => 'Присвоение отрицательного индекса n пустому массиву теперь гарантирует, что следующим индексом будет n + 1, а не 0.',
+ 'bc_range' => 'Изменения в функции range().',
+ 'bc_traits' => 'Изменения в повторном объявлении статических свойств в трейтах.',
+ 'bc_umultipledecimalseparators' => 'Константа U_MULTIPLE_DECIMAL_SEPERATORS объявлена устаревшей, вместо неё рекомендуется использовать константу U_MULTIPLE_DECIMAL_SEPARATORS.',
+ 'bc_mtrand' => 'Вариант Mt19937 MT_RAND_PHP объявлен устаревшим.',
+ 'bc_reflection' => 'ReflectionClass::getStaticProperties() теперь не возвращает значение null.',
+ 'bc_ini' => 'Параметры INI assert.active, assert.bail, assert.callback, assert.exception и assert.warning объявлены устаревшими.',
+
+ 'footer_title' => 'Выше производительность, лучше синтаксис, надёжнее система типов.',
+ 'footer_description' => 'Для загрузки исходного кода PHP 8.3 посетите страницу Downloads. Бинарные файлы Windows находятся на сайте PHP for Windows. Список изменений перечислен на странице ChangeLog.
+Руководство по миграции доступно в разделе документации. Ознакомьтесь с ним, чтобы узнать обо всех новых возможностях и изменениях, затрагивающих обратную совместимость.
', +]; diff --git a/releases/8.3/release.inc b/releases/8.3/release.inc new file mode 100644 index 0000000000..501f873067 --- /dev/null +++ b/releases/8.3/release.inc @@ -0,0 +1,494 @@ + +