diff --git a/releases/8.0/common.php b/releases/8.0/common.php index 6e03f6b59f..bd1b9a5d30 100644 --- a/releases/8.0/common.php +++ b/releases/8.0/common.php @@ -69,3 +69,13 @@ function language_chooser(string $currentLang): void { '; } + +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.0/de.php b/releases/8.0/de.php index 78b1252027..45cb5470ed 100644 --- a/releases/8.0/de.php +++ b/releases/8.0/de.php @@ -1,506 +1,5 @@ -
-
-
- -
-
-
- -
Released!
-
- PHP 8.0 ist ein Major-Update der Sprache PHP.
Es beinhaltet viele neue Funktionen - und Optimierungen wie beispielsweise Named Arguments, Union Types, Attribute, Constructor Property Promotion, - Match Ausdrücke, Nullsafe Operator, JIT und Verbesserungen des Typen-Systems, der Fehlerbehandlung und der - Konsistenz. -
- -
-
- -
-
-

- Named Arguments - RFC - Doc -

-
-
-
PHP 7
-
- -
-
-
-
-
PHP 8
-
- -
-
-
-
-
    -
  • Gib nur notwendige Parameter an, überspringe optionale.
  • -
  • Parameter sind unabhängig von der Reihenfolge und selbstdokumentierend.
  • -
-
-
- -
-

- Attribute - RFC Doc -

-
-
-
PHP 7
-
- -
-
-
-
-
PHP 8
-
- -
-
-
-
-

Anstelle von PHPDoc Annotations kannst du nun strukturierte Meta-Daten in nativer PHP Syntax nutzen.

-
-
- -
-

- Constructor Property Promotion - RFC Doc -

-
-
-
PHP 7
-
- x = $x; - $this->y = $y; - $this->z = $z; - } -}', - );?> -
-
-
-
-
PHP 8
-
- -
-
-
-
-

Weniger Codewiederholungen für das Definieren und Initialisieren von Objektattributen.

-
-
- -
-

- Union Types - RFC Doc -

-
-
-
PHP 7
-
- number = $number; - } -} - -new Number(\'NaN\'); // Ok', - );?> -
-
-
-
-
PHP 8
-
- -
-
-
-
-

Anstelle von PHPDoc Annotations für kombinierte Typen kannst du native Union-Type-Deklarationen verwenden, - welche zur Laufzeit validiert werden.

-
-
- -
-

- Match Ausdruck - RFC Doc -

-
-
-
PHP 7
-
- Oh nein!', - );?> -
-
-
-
-
PHP 8
-
- "Oh nein!", - 8.0 => "Das hatte ich erwartet", -}; -//> Das hatte ich erwartet', - );?> -
-
-
-
-

Der neue Match Ausdruck ist ähnlich wie die Switch Anweisung und bietet folgende Funktionen:

-
    -
  • Da Match ein Ausdruck ist, kann sein Ergebnis in einer Variable gespeichert oder ausgegeben werden.
  • -
  • Match Zweige unterstützen nur einzeilige Ausdrücke und benötigen keinen break; Ausdruck.
  • -
  • Match führt strikte Vergleiche durch.
  • -
-
-
- -
-

- Nullsafe Operator - RFC -

-
-
-
PHP 7
-
- user; - - if ($user !== null) { - $address = $user->getAddress(); - - if ($address !== null) { - $country = $address->country; - } - } -}', - );?> -
-
-
-
-
PHP 8
-
- user?->getAddress()?->country;', - );?> -
-
-
-
-

Anstelle von Null-Checks kannst du Funktionsaufrufe nun direkt mit dem neuen Nullsafe Operator - aneinanderreihen. Wenn ein Funktionsaufruf innerhalb der Kette Null zurückliefert, wird die weitere - Ausführung abgebrochen und die gesamte Kette wird zu Null ausgewertet.

-
-
- -
-

- Vernünftige String-zu-Zahl Vergleiche - RFC -

-
-
-
PHP 7
-
- -
-
-
-
-
PHP 8
-
- -
-
-
-
-

Wenn eine Zahl mit einem numerischen String verglichen wird, benutzt PHP 8 einen Zahlen-Vergleich. Andernfalls - wird die Zahl zu einem String konvertiert und ein String-Vergleich durchgeführt.

-
-
- -
-

- Konsistente Typen-Fehler für interne Funktionen - RFC -

-
-
-
PHP 7
-
- -
-
-
-
-
PHP 8
-
- -
-
-
-
-

Die meisten internen Funktionen erzeugen nun eine Error Exception wenn die Typenvalidierung der Parameter - fehlschlägt.

-
-
-
- -
-

Just-In-Time Compiler

-

- PHP 8 führt zwei JIT Compiler Engines ein. Tracing-JIT, der vielversprechendere der beiden, zeigt eine bis zu drei - mal bessere Performance in synthetischen Benchmarks und eine 1,5 bis zweifache Verbesserung in einigen speziellen, - langlaufenden Anwendungen. Die Performance einer typischen Anwendung ist auf dem Niveau von PHP 7.4. -

-

- Relativer Beitrag des JIT Compilers zur Performance von PHP 8 -

-

- Just-In-Time compilation -

- -
-
-

Verbesserungen am Typen-System und an der Fehlerbehandlung

-
    -
  • - Striktere Typen-Checks für arithmetische/bitweise Operatoren - RFC -
  • -
  • - Validierung abstrakter Methoden in einem Trait RFC -
  • -
  • - Korrekte Signaturen magischer Funktionen RFC -
  • -
  • - Neue Klassifizierung von Engine-Warnings RFC -
  • -
  • - Inkompatiblen Methoden-Signaturen erzeugen einen Fatal Error RFC -
  • -
  • - Der @ Operator unterdrückt keine Fatal Errors mehr. -
  • -
  • - Vererbung mit privaten Methoden RFC -
  • -
  • - Mixed Typ RFC -
  • -
  • - Static als Rückgabetyp RFC -
  • -
  • - Typen für interne Funktionen - E-Mail-Thread -
  • -
  • - Objekte ohne Methoden anstelle des resource Typs für - Curl, - Gd, - Sockets, - OpenSSL, - XMLWriter, und - XML - Extension -
  • -
-
-
-

Weitere Syntax-Anpassungen und Verbesserungen

-
    -
  • - Erlauben eines abschließenden Kommas in Parameter-Listen RFC - und Closure Use Listen RFC. -
  • -
  • - Catches ohne Exception-Variable RFC -
  • -
  • - Anpassungen an der Syntax für Variablen RFC -
  • -
  • - Namespaces werden als ein Token ausgewertet RFC -
  • -
  • - Throw ist jetzt ein Ausdruck RFC -
  • -
  • - Nutzung von ::class auf Objekten RFC -
  • -
- -

Neue Klassen, Interfaces, und Funktionen

- -
-
-
- - - - - - - -
-
-
- -
-
-
- -
Released!
-
- PHP 8.0 is a major update of the PHP language.
It contains many new features and - optimizations including named arguments, union types, attributes, constructor property promotion, match - expression, nullsafe operator, JIT, and improvements in the type system, error handling, and consistency. -
- -
-
- -
-
-

- Named arguments - RFC - Doc -

-
-
-
PHP 7
-
- -
- - -
-
-
-
PHP 8
-
- -
-
-
-
-
    -
  • Specify only required parameters, skipping optional ones.
  • -
  • Arguments are order-independent and self-documented.
  • -
-
-
- -
-

- Attributes - RFC Doc -

-
-
-
PHP 7
-
- -
-
-
-
-
PHP 8
-
- -
-
-
-
-

Instead of PHPDoc annotations, you can now use structured metadata with PHP's native syntax.

-
-
- -
-

- Constructor property promotion - RFC Doc -

-
-
-
PHP 7
-
- x = $x; - $this->y = $y; - $this->z = $z; - } -}', - );?> -
-
-
-
-
PHP 8
-
- -
-
-
-
-

Less boilerplate code to define and initialize properties.

-
-
- -
-

- Union types - RFC Doc -

-
-
-
PHP 7
-
- number = $number; - } -} - -new Number(\'NaN\'); // Ok', - );?> -
-
-
-
-
PHP 8
-
- -
-
-
-
-

Instead of PHPDoc annotations for a combination of types, you can use native union type declarations that are - validated at runtime.

-
-
- -
-

- Match expression - RFC Doc -

-
-
-
PHP 7
-
- Oh no!', - );?> -
-
-
-
-
PHP 8
-
- "Oh no!", - 8.0 => "This is what I expected", -}; -//> This is what I expected', - );?> -
-
-
-
-

The new match is similar to switch and has the following features:

-
    -
  • Match is an expression, meaning its result can be stored in a variable or returned.
  • -
  • Match branches only support single-line expressions and do not need a break; statement.
  • -
  • Match does strict comparisons.
  • -
-
-
- -
-

- Nullsafe operator - RFC -

-
-
-
PHP 7
-
- user; - - if ($user !== null) { - $address = $user->getAddress(); - - if ($address !== null) { - $country = $address->country; - } - } -}', - );?> -
-
-
-
-
PHP 8
-
- user?->getAddress()?->country;', - );?> -
-
-
-
-

Instead of null check conditions, you can now use a chain of calls with the new nullsafe operator. When the - evaluation of one element in the chain fails, the execution of the entire chain aborts and the entire chain - evaluates to null.

-
-
- -
-

- Saner string to number comparisons - RFC -

-
-
-
PHP 7
-
- -
-
-
-
-
PHP 8
-
- -
-
-
-
-

When comparing to a numeric string, PHP 8 uses a number comparison. Otherwise, it converts the number to a - string and uses a string comparison.

-
-
- -
-

- Consistent type errors for internal functions - RFC -

-
-
-
PHP 7
-
- -
-
-
-
-
PHP 8
-
- -
-
-
-
-

Most of the internal functions now throw an Error exception if the validation of the parameters fails.

-
-
-
- -
-

Just-In-Time compilation

-

- PHP 8 introduces two JIT compilation engines. Tracing JIT, the most promising of the two, shows about 3 times better - performance on synthetic benchmarks and 1.5–2 times improvement on some specific long-running applications. Typical - application performance is on par with PHP 7.4. -

-

- Relative JIT contribution to PHP 8 performance -

-

- Just-In-Time compilation -

- -
-
-

Type system and error handling improvements

-
    -
  • - Stricter type checks for arithmetic/bitwise operators - RFC -
  • -
  • - Abstract trait method validation RFC -
  • -
  • - Correct signatures of magic methods RFC -
  • -
  • - Reclassified engine warnings RFC -
  • -
  • - Fatal error for incompatible method signatures RFC -
  • -
  • - The @ operator no longer silences fatal errors. -
  • -
  • - Inheritance with private methods RFC -
  • -
  • - Mixed type RFC -
  • -
  • - Static return type RFC -
  • -
  • - Types for internal functions - Email thread -
  • -
  • - Opaque objects instead of resources for - Curl, - Gd, - Sockets, - OpenSSL, - XMLWriter, and - XML - extensions -
  • -
-
-
-

Other syntax tweaks and improvements

-
    -
  • - Allow a trailing comma in parameter lists RFC - and closure use lists RFC -
  • -
  • - Non-capturing catches RFC -
  • -
  • - Variable Syntax Tweaks RFC -
  • -
  • - Treat namespaced names as single token RFC -
  • -
  • - Throw is now an expression RFC -
  • -
  • - Allow ::class on objects RFC -
  • -
- -

New Classes, Interfaces, and Functions

- -
-
-
- - - - - - - -
-
-
- -
-
-
- -
Released!
-
- PHP 8.0 es una actualización importante del lenguaje PHP que contiene nuevos recursos y optimizaciones - incluyendo argumentos nombrados, tipos de uniones, atributos, promoción de propiedades constructivas, - expresiones match, operador nullsafe, JIT (traducción dinámica) y también mejoras en el sistema de tipos, - manejo de errores y consistencia en general. -
- -
-
- -
-
-

- Argumentos nombrados - RFC - Doc -

-
-
-
PHP 7
-
- -
- - -
-
-
-
PHP 8
-
- -
-
-
-
-
    -
  • Solamente especifica los parámetros requeridos, omite los opcionales.
  • -
  • Los argumentos son independientes del orden y se documentan automáticamente.
  • -
-
-
- -
-

- Atributos - RFC Doc -

-
-
-
PHP 7
-
- -
-
-
-
-
PHP 8
-
- -
-
-
-
-

En vez de anotaciones en PHPDoc, puedes usar metadatos estructurados con la sintaxis nativa de PHP.

-
-
- -
-

- Promoción de propiedades constructivas - RFC Doc -

-
-
-
PHP 7
-
- x = $x; - $this->y = $y; - $this->z = $z; - } -}', - );?> -
-
-
-
-
PHP 8
-
- -
-
-
-
-

Menos código repetitivo para definir e inicializar una propiedad.

-
-
- -
-

- Tipos de unión - RFC - Doc -

-
-
-
PHP 7
-
- number = $number; - } -} - -new Number(\'NaN\'); // Ok', - );?> -
-
-
-
-
PHP 8
-
- -
-
-
-
-

En vez de anotaciones en PHPDoc para combinar tipos, puedes usar una declaración de tipo unión nativa que será validada en el momento de ejecución.

-
-
- -
-

- Expresiones match - RFC Doc -

-
-
-
PHP 7
-
- Oh no!', - );?> -
-
-
-
-
PHP 8
-
- "Oh no!", - 8.0 => "This is what I expected", -}; -//> This is what I expected', - );?> -
-
-
-
- -

Las nuevas expresiones match son similares a switch y tienen las siguientes características:

-
    -
  • Match es una expresión; esto quiere decir que pueden ser almacenadas como variables o devueltas.
  • -
  • Match soporta expresiones de una línea y no necesitan romper declarar un break.
  • -
  • Match hace comparaciones estrictas.
  • -
-
-
- -
-

- Operador Nullsafe - RFC -

-
-
-
PHP 7
-
- user; - - if ($user !== null) { - $address = $user->getAddress(); - - if ($address !== null) { - $country = $address->country; - } - } -}', - );?> -
-
-
-
-
PHP 8
-
- user?->getAddress()?->country;', - );?> -
-
-
-
-

En vez de verificar condiciones nulas, tu puedes utilizar una cadena de llamadas con el nuevo operador nullsafe. - Cuando la evaluación de un elemento falla, la ejecución de la entire cadena es abortada y la cadena entera es evaluada como nula.

-
-
- -
-

- Comparaciones inteligentes entre “strings” y números - RFC -

-
-
-
PHP 7
-
- -
-
-
-
-
PHP 8
-
- -
-
-
-
-

Cuando comparas con un “string” numérico, PHP8 usa comparación numérica o de otro caso convierte el número a - un "string" y asi los compara.

-
-
- -
-

- Errores consistentes para funciones internas. - RFC -

-
-
-
PHP 7
-
- -
-
-
-
-
PHP 8
-
- -
-
-
-
-

La mayoría de las funciones internas ahora proveen un error de excepción si el parámetro no es validado.

-
-
-
- -
-

JIT (traducciones dinámicas)

-

- PHP8 introduce 2 motores de compilación JIT. Transit JIT, es el más prometedor de los dos y performa 3 veces mejor - en benchmarks sintéticos y 1.5-2 mejor en algunas aplicaciones específicas a largo plazo. Performancia de aplicaciones - típicas es a la par de las de PHP7.4 -

-

- JIT contribuciones al funcionamiento relativo de PHP8 -

-

- Just-In-Time compilation -

- -
-
-

Mejorias en los tipos de sistemas y manejo de errores

-
    -
  • - Verificaciones estrictas de operadores aritméticos/bitwise. - RFC -
  • -
  • - Validación de métodos con características abstractas RFC -
  • -
  • - Firmas correctas de métodos mágicos RFC -
  • -
  • - Reclacificamiento de errores fatales RFC -
  • -
  • - Errores fatales incompatibles con el método de firma RFC -
  • -
  • - El operador @ no omitirá errores fatales. -
  • -
  • - Herencia con métodos privados RFC -
  • -
  • - Tipos mixtos RFC -
  • -
  • - Tipo retorno statico RFC -
  • -
  • - Tipos para funciones internas - Email thread -
  • -
  • - Objetos opacos en ves de recursos para - Curl, - Gd, - Sockets, - OpenSSL, - XMLWriter, - y XML extensiones -
  • -
-
-
-

Otros ajustes y mejoras del sintax

-
    -
  • - Permitir una coma al final de una lista de parámetros RFC - y lista de use en closures RFC -
  • -
  • - Catches que no capturan RFC -
  • -
  • - Ajustes al syntax variable RFC -
  • -
  • - Tratamiento de nombres de namespace como tokens únicosRFC -
  • -
  • - Throw es ahora una expresión RFC -
  • -
  • - Permitir ::class on objects RFC -
  • -
- -

Nuevas clases, interfaces y funciones

- -
-
-
- - - - -
-
-
- -
-
-
- -
Released!
-
- PHP 8.0 est une mise à jour majeure du langage PHP.
- Elle contient beaucoup de nouvelles fonctionnalités et d'optimisations, incluant les arguments nommés, - les types d'union, attributs, promotion de propriété de constructeur, l'expression match, l'opérateur - nullsafe, JIT (Compilation à la Volée), et des améliorations dans le système de typage, la gestion - d'erreur, et de cohérence. -
- -
-
- -
-
-

- Arguments nommés - RFC - Doc -

-
-
-
PHP 7
-
- -
- - -
-
-
-
PHP 8
-
- -
-
-
-
-
    -
  • Spécifiez uniquement les paramètres requis, omettant ceux optionnels.
  • -
  • Les arguments sont indépendants de l'ordre et auto-documentés.
  • -
-
-
- -
-

- Attributs - RFC Doc -

-
-
-
PHP 7
-
- -
-
-
-
-
PHP 8
-
- -
-
-
-
-

Au lieux d'annotations PHPDoc, vous pouvez désormais utiliser les métadonnées structurés avec la syntaxe native de PHP.

-
-
- -
-

- Promotion de propriétés de constructeur - RFC Doc -

-
-
-
PHP 7
-
- x = $x; - $this->y = $y; - $this->z = $z; - } -}', - );?> -
-
-
-
-
PHP 8
-
- -
-
-
-
-

Moins de code redondant pour définir et initialiser les propriétés.

-
-
- -
-

- Types d'union - RFC Doc -

-
-
-
PHP 7
-
- number = $number; - } -} - -new Number(\'NaN\'); // Ok', - );?> -
-
-
-
-
PHP 8
-
- -
-
-
-
-

- Au lieu d'annotation PHPDoc pour une combinaison de type, vous pouvez utiliser les déclarations de types - d'union native qui sont validées lors de l'exécution. -

-
-
- -
-

- Expression match - RFC Doc -

-
-
-
PHP 7
-
- Oh no!', - );?> -
-
-
-
-
PHP 8
-
- "Oh no!", - 8.0 => "This is what I expected", -}; -//> This is what I expected', - );?> -
-
-
-
-

La nouvelle instruction match est similaire à switch et a les fonctionnalités suivantes :

-
    -
  • Match est une expression, signifiant que son résultat peut être enregistré dans une variable ou retourné.
  • -
  • Les branches de match supportent uniquement les expressions d'une seule ligne, et n'a pas besoin d'une déclaration break;.
  • -
  • Match fait des comparaisons strictes.
  • -
-
-
- -
-

- Opérateur Nullsafe - RFC -

-
-
-
PHP 7
-
- user; - - if ($user !== null) { - $address = $user->getAddress(); - - if ($address !== null) { - $country = $address->country; - } - } -}', - );?> -
-
-
-
-
PHP 8
-
- user?->getAddress()?->country;', - );?> -
-
-
-
-

- Au lieu de faire des vérifications conditionnelles de null, vous pouvez utiliser une chaîne d'appel - avec le nouvel opérateur nullsafe. Qui lorsque l'évaluation d'un élément de la chaîne échoue, l'exécution - de la chaîne complète est terminée et la chaîne entière évalue à null. -

-
-
- -
-

- Comparaisons entre les chaînes de caractères et les nombres plus saines - RFC -

-
-
-
PHP 7
-
- -
-
-
-
-
PHP 8
-
- -
-
-
-
-

- Lors de la comparaison avec une chaîne numérique, PHP 8 utilise une comparaison de nombre. - Sinon, il convertit le nombre à une chaîne de caractères et utilise une comparaison de chaîne de caractères. -

-
-
- -
-

- Erreurs de type cohérent pour les fonctions internes - RFC -

-
-
-
PHP 7
-
- -
-
-
-
-
PHP 8
-
- -
-
-
-
-

La plupart des fonctions internes lancent désormais une exception Error si la validation du paramètre échoue.

-
-
-
- -
-

Compilation Juste-à-Temps (JIT)

-

- PHP 8 introduit deux moteurs de compilation JIT (juste à temps/compilation à la volée). - Le Tracing JIT, le plus prometteur des deux, montre environ 3 fois plus de performances sur des benchmarks - synthétiques et 1,5-2 fois plus de performances sur certaines applications à longue durée d'exécution. - Généralement les performances des applications sont identiques à PHP 7.4. -

-

- Contribution relative du JIT à la performance de PHP 8 -

-

- Just-In-Time compilation -

- -
-
-

Amélioration du système de typage et de la gestion d'erreur

-
    -
  • - Vérification de type plus sévère pour les opérateurs arithmétiques et bit à bit - RFC -
  • -
  • - Validation de méthode abstraite des traits RFC -
  • -
  • - Signature valide des méthodes magiques RFC -
  • -
  • - Reclassifications des avertissements du moteur RFC -
  • -
  • - Erreur fatale pour des signatures de méthodes incompatibles RFC -
  • -
  • - L'opérateur @ ne silence plus les erreurs fatales. -
  • -
  • - Héritages avec les méthodes privées RFC -
  • -
  • - Type mixed RFC -
  • -
  • - Type de retour static RFC -
  • -
  • - Types pour les fonctions internes - Discussion e-mail -
  • -
  • - Objets opaques au lieu de ressources pour les extensions - Curl, - Gd, - Sockets, - OpenSSL, - XMLWriter, et - XML -
  • -
-
-
-

Autres ajustements de syntaxe et améliorations

-
    -
  • - Autorisation des virgules trainantes dans les listes de paramètres RFC - et dans les listes des use d'une fermeture RFC -
  • -
  • - Les catchs non capturant RFC -
  • -
  • - Ajustement de la Syntaxe des Variables RFC -
  • -
  • - Traite les noms des espaces de nom comme un seul token RFC -
  • -
  • - Throw est désormais une expression RFC -
  • -
  • - Autorisation de ::class sur les objets RFC -
  • -
- -

Nouvelles Classes, Interfaces, et Fonctions

- -
-
-
- - - - - - - -
-
-
- -
-
-
- -
Released!
-
- PHP 8.0 è una nuova versione major del linguaggio PHP.
- Contiene molte nuove funzionalità ed ottimizzazioni quali i named arguments, - la definizione di tipi unione, gli attributi, la promozione a proprietà degli argomenti del costruttore, - l'espressione match, l'operatore nullsafe, la compilazione JIT e - miglioramenti al sistema dei tipi, alla gestione degli errori e alla consistenza. -
- -
-
- -
-
-

- Named arguments - RFC - Doc -

-
-
-
PHP 7
-
- -
- - -
-
-
-
PHP 8
-
- -
-
-
-
-
    -
  • Indica solamente i parametri richiesti, saltando quelli opzionali.
  • -
  • Gli argomenti sono indipendenti dall'ordine e auto-documentati.
  • -
-
-
- -
-

- Attributi - RFC Doc -

-
-
-
PHP 7
-
- -
-
-
-
-
PHP 8
-
- -
-
-
-
-

Invece delle annotazioni PHPDoc, ora puoi usare metadati strutturati nella sintassi nativa PHP.

-
-
- -
-

- Promozione a proprietà degli argomenti del costruttore - RFC Doc -

-
-
-
PHP 7
-
- x = $x; - $this->y = $y; - $this->z = $z; - } -}', - );?> -
-
-
-
-
PHP 8
-
- -
-
-
-
-

Meno ripetizioni di codice per definire ed inizializzare le proprietà.

-
-
- -
-

- Tipi unione - RFC Doc -

-
-
-
PHP 7
-
- number = $number; - } -} - -new Number(\'NaN\'); // Ok', - );?> -
-
-
-
-
PHP 8
-
- -
-
-
-
-

Invece di indicare una combinazione di tipi con le annotazioni PHPDoc, puoi usare una dichiarazione nativa - di tipo unione che viene validato durante l'esecuzione.

-
-
- -
-

- Espressione match - RFC Doc -

-
-
-
PHP 7
-
- Oh no!', - );?> -
-
-
-
-
PHP 8
-
- "Oh no!", - 8.0 => "This is what I expected", -}; -//> This is what I expected', - );?> -
-
-
-
-

La nuova espressione match è simile allo switch e ha le seguenti funzionalità:

-
    -
  • Match è un'espressione, ovvero il suo risultato può essere salvato in una variabile o ritornato.
  • -
  • I rami del match supportano solo espressioni a singola linea e non necessitano di un'espressione break;.
  • -
  • Match esegue comparazioni strict.
  • -
-
-
- -
-

- Operatore nullsafe - RFC -

-
-
-
PHP 7
-
- user; - - if ($user !== null) { - $address = $user->getAddress(); - - if ($address !== null) { - $country = $address->country; - } - } -}', - );?> -
-
-
-
-
PHP 8
-
- user?->getAddress()?->country;', - );?> -
-
-
-
-

Invece di controllare la presenza di un null, puoi ora usare una catena di chiamate con il nuovo operatore nullsafe. Quando - la valutazione di un elemento della catena fallisce, l'esecuzione della catena si interrompe e l'intera catena - restituisce il valore null.

-
-
- -
-

- Comparazioni più coerenti di stringhe e numeri - RFC -

-
-
-
PHP 7
-
- -
-
-
-
-
PHP 8
-
- -
-
-
-
-

Nella comparazione di una stringa numerica, PHP 8 usa la comparazione numerica. Altrimenti, converte il numero - in una stringa e usa la comparazione tra stringhe.

-
-
- -
-

- Tipi di errori consistenti per le funzioni native - RFC -

-
-
-
PHP 7
-
- -
-
-
-
-
PHP 8
-
- -
-
-
-
-

La maggior parte delle funzioni native ora lanciano una eccezione Error se la validazione degli argomenti fallisce.

-
-
-
- -
-

Compilazione Just-In-Time

-

- PHP 8 intrduce due motori di compilazione JIT. Tracing JIT, il più promettente dei due, mostra delle prestazioni 3 - volte superiori nei benchmarks sintetici e 1.5–2 volte superiori per alcuni specifici processi applicativi a lunga esecuzione. - Le prestazioni delle tipiche applicazioni web sono al pari con PHP 7.4. -

-

- Miglioramenti delle performance in PHP 8 grazie a JIT -

-

- Just-In-Time compilation -

- -
-
-

Sistema dei tipi e miglioramenti alla gestione degli errori

-
    -
  • - Controlli più stringenti per gli operatori aritmetici e bitwise - RFC -
  • -
  • - Validazione dei metodi astratti nei trait RFC -
  • -
  • - Firme corrette nei metodi magici RFC -
  • -
  • - Riclassificazione degli errori RFC -
  • -
  • - Errori fatali per firme di metodi non compatibili RFC -
  • -
  • - L'operatore @ non silenzia più gli errori fatali. -
  • -
  • - Ereditarietà e metodi privati RFC -
  • -
  • - Tipo mixed RFC -
  • -
  • - Tipo di ritorno static RFC -
  • -
  • - Tipi per le funzioni native - Email thread -
  • -
  • - Oggetti opachi invece che risorse per le estensioni - Curl, - Gd, - Sockets, - OpenSSL, - XMLWriter, e - XML -
  • -
-
-
-

Altre ritocchi e migliorie di sintassi

-
    -
  • - Permessa una virgola finale nella lista dei parametri RFC - e nell'espressione use per le closure RFC -
  • -
  • - Catch senza argomento RFC -
  • -
  • - Correzioni alla sintassi di variabile RFC -
  • -
  • - Trattamento dei nomi di namespace come un singolo token RFC -
  • -
  • - Throw è ora un'espressione RFC -
  • -
  • - Permesso l'utilizzo di ::class sugli oggetti RFC -
  • -
- -

Nuove classi, interfacce e funzioni

- -
-
-
- - - - -
-
-
- -
-
-
- -
Released!
-
- PHP 8.0 は、PHP 言語のメジャーアップデートです。
このアップデートには、たくさんの新機能や最適化が含まれています。 - たとえば 名前付き引数、 union 型、アトリビュート、コンストラクタでのプロパティのプロモーション、match 式、nullsafe 演算子、JIT、型システムの改善、エラーハンドリング、一貫性の向上などです。 -
- -
-
- -
-
-

- 名前付き引数 - RFC - Doc -

-
-
-
PHP 7
-
- -
- - -
-
-
-
PHP 8
-
- -
-
-
-
-
    -
  • 必須の引数だけを指定し、オプションの引数はスキップしています。
  • -
  • 引数の順番に依存せず、自己文書化(self-documented)されています。
  • -
-
-
- -
-

- アトリビュート - RFC Doc -

-
-
-
PHP 7
-
- -
-
-
-
-
PHP 8
-
- -
-
-
-
-

PHPDoc のアノテーションの代わりに、PHP ネイティブの文法で構造化されたメタデータを扱えるようになりました。

-
-
- -
-

- コンストラクタでの、プロパティのプロモーション - RFC Doc -

-
-
-
PHP 7
-
- x = $x; - $this->y = $y; - $this->z = $z; - } -}', - );?> -
-
-
-
-
PHP 8
-
- -
-
-
-
-

ボイラープレートのコードを減らすため、コンストラクタでプロパティを定義し、初期化します。

-
-
- -
-

- Union 型 - RFC Doc -

-
-
-
PHP 7
-
- number = $number; - } -} - -new Number(\'NaN\'); // Ok', - );?> -
-
-
-
-
PHP 8
-
- -
-
-
-
-

PHPDoc のアノテーションを使って型を組み合わせる代わりに、実行時に検証が行われる union型 をネイティブで使えるようになりました。

-
-
- -
-

- Match 式 - RFC Doc -

-
-
-
PHP 7
-
- Oh no!', - );?> -
-
-
-
-
PHP 8
-
- "Oh no!", - 8.0 => "This is what I expected", -}; -//> This is what I expected', - );?> -
-
-
-
-

match は switch 文に似ていますが、以下の機能があります:

-
    -
  • match は式なので、結果を返したり、変数に保存したりできます。
  • -
  • match の分岐は一行の式だけをサポートしており、break; 文は不要です。
  • -
  • match は、型と値について、厳密な比較を行います。
  • -
-
-
- -
-

- Nullsafe 演算子 - RFC -

-
-
-
PHP 7
-
- user; - - if ($user !== null) { - $address = $user->getAddress(); - - if ($address !== null) { - $country = $address->country; - } - } -}', - );?> -
-
-
-
-
PHP 8
-
- user?->getAddress()?->country;', - );?> -
-
-
-
-

null チェックの条件を追加する代わりに、nullsafe演算子 を使って呼び出しをチェインさせられるようになりました。呼び出しチェインのひとつが失敗すると、チェインの実行全体が停止し、null と評価されます。

-
-
- -
-

- 数値と文字列の比較 - RFC -

-
-
-
PHP 7
-
- -
-
-
-
-
PHP 8
-
- -
-
-
-
-

数値形式の文字列と比較する場合は、PHP 8 は数値として比較を行います。それ以外の場合は、数値を文字列に変換し、文字列として比較を行います。

-
-
- -
-

- - 内部関数の型に関するエラーが一貫したものに - RFC -

-
-
-
PHP 7
-
- -
-
-
-
-
PHP 8
-
- -
-
-
-
-

ほとんどの内部関数は、引数の検証に失敗すると Error 例外をスローするようになりました。

-
-
-
- -
-

JIT (ジャストインタイム) コンパイル

-

- PHP 8 は JITコンパイル のエンジンをふたつ搭載しています。 - トレーシングJITは、もっとも有望なふたつの人工的なベンチマークで、 - 約3倍のパフォーマンスを示しました。 - また、長期間動いている特定のあるアプリケーションでは、1.5-2倍のパフォーマンス向上が見られました。 - 典型的なアプリケーションのパフォーマンスは、PHP 7.4 と同等でした。 -

-

- PHP 8 のパフォーマンスに対するJITの貢献 - -

-

- Just-In-Time compilation -

- -
-
-

型システムとエラーハンドリングの改善

-
    -
  • - 算術/ビット演算子のより厳密な型チェック - RFC -
  • -
  • - トレイトの抽象メソッドの検証 RFC -
  • -
  • - マジックメソッドのシグネチャ RFC -
  • -
  • - エンジンの警告を整理 RFC -
  • -
  • - 互換性のないメソッドシグネチャは fatal error に。 - RFC -
  • -
  • - @ 演算子は、致命的なエラーを隠さなくなりました。 -
  • -
  • - private メソッドの継承時のシグネチャチェック RFC -
  • -
  • - Mixed 型のサポート RFC -
  • -
  • - 戻り値で static 型をサポート RFC -
  • -
  • - 内部関数に型アノテーション - Email thread -
  • -
  • - 一部の拡張機能が、リソースからオブジェクトに移行: - Curl, - Gd, - Sockets, - OpenSSL, - XMLWriter, - XML -
  • -
-
-
-

その他文法の調整や改善

-
    -
  • - 引数やクロージャーのuseリストの最後にカンマがつけられるように RFC - RFC -
  • -
  • - catch で例外のキャプチャが不要に RFC -
  • -
  • - 変数の文法の調整 RFC -
  • -
  • - 名前空間の名前を単一のトークンとして扱う RFC -
  • -
  • - Throw は式になりました RFC -
  • -
  • - オブジェクトに対して ::class が使えるように RFC -
  • -
- -

新しいクラス、インターフェイス、関数

- -
-
-
- - - - - - - -
-
-
- -
-
-
- -
რელიზი!
-
- PHP 8.0 — PHP ენის დიდი განახლება.
ის შეიცავს ბევრ ახალ შესაძლებლობას და ოპტიმიზაციებს, - მათ შორის დასახელებული არგუმენტები, union type, ატრიბუტები, თვისებების გამარტივებული განსაზღვრა კონსტრუქტორში, გამოსახულება match, - ოპერატორი nullsafe, JIT და გაუმჯობესებები ტიპის სისტემაში, შეცდომების დამუშავება და თანმიმდევრულობა. -
- -
-
- -
-
-

- დასახელებული არგუმენტები - RFC - დოკუმენტაცია -

-
-
-
PHP 7
-
- -
- - -
-
-
-
PHP 8
-
- -
-
-
-
-
    -
  • მიუთითეთ მხოლოდ საჭირო პარამეტრები, გამოტოვეთ არასავალდებულო.
  • -
  • არგუმენტების თანმიმდევრობა არ არის მნიშვნელოვანი, არგუმენტები თვითდოკუმენტირებადია.
  • -
-
-
- -
-

- Attributes - RFC დოკუმენტაცია -

-
-
-
PHP 7
-
- -
-
-
-
-
PHP 8
-
- -
-
-
-
-

PHPDoc ანოტაციების ნაცვლად, შეგიძლიათ გამოიყენოთ სტრუქტურული მეტამონაცემები ნატიური PHP სინტაქსით.

-
-
- -
-

- თვისებების განახლება კონსტრუქტორში - RFC დოკუმენტაცია -

-
-
-
PHP 7
-
- x = $x; - $this->y = $y; - $this->z = $z; - } -}', - );?> -
-
-
-
-
PHP 8
-
- -
-
-
-
-

ნაკლები შაბლონური კოდი თვისებების განსაზღვრისა და ინიციალიზაციისთვის.

-
-
- -
-

- Union types - RFC დოკუმენტაცია -

-
-
-
PHP 7
-
- number = $number; - } -} - -new Number(\'NaN\'); // შეცდომები არაა', - );?> -
-
-
-
-
PHP 8
-
- -
-
-
-
-

PHPDoc ანოტაციების ნაცვლად, გაერთიანებული ტიპებისთვის შეგიძლიათ გამოიყენოთ განცხადება union type, - რომლებიც მოწმდება შესრულების დროს.

-
-
- -
-

- გამოსახულება Match - RFC დოკუმენტაცია -

-
-
-
PHP 7
-
- ოოო არა!', - );?> -
-
-
-
-
PHP 8
-
- "Oh no!", - 8.0 => "ის, რასაც მე ველოდი", -}; -//> ის, რასაც მე ველოდი', - );?> -
-
-
-
-

ახალი გამოსახულება match, switch ოპერატორის მსგავსია შემდეგი მახასიათებლებით:

-
    -
  • Match — ეს არის გამოსახულება, მისი შედეგი შეიძლება შენახული იყოს ცვლადში ან დაბრუნდეს.
  • -
  • პირობა match მხარს უჭერერს მხოლოდ ერთსტრიქონიან გამოსახულებებს, რომლებიც არ საჭიროებენ break; კონტროლის კონსტრუქციას.
  • -
  • გამოსახულება match იყენებს მკაცრ შედარებას.
  • -
-
-
- -
-

- ოპერატორი Nullsafe - RFC -

-
-
-
PHP 7
-
- user; - - if ($user !== null) { - $address = $user->getAddress(); - - if ($address !== null) { - $country = $address->country; - } - } -}', - );?> -
-
-
-
-
PHP 8
-
- user?->getAddress()?->country;', - );?> -
-
-
-
-

null-ის შემოწმების ნაცვლად, შეგიძლიათ გამოიყენოთ გამოძახების თანმიმდევრობა ახალ Nullsafe ოპერატორით. - როდესაც ერთ-ერთი ელემენტი თანმიმდევრობაში აბრუნებს null-ს, შესრულება ჩერდება და მთელი თანმიმდევრობა აბრუნებს null-ს.

-
-
- -
-

- სტრიქონებისა და რიცხვების გაუმჯობესებული შედარება - RFC -

-
-
-
PHP 7
-
- -
-
-
-
-
PHP 8
-
- -
-
-
-
-

PHP 8 რიცხვითი სტრიქონის შედარებისას იყენებს რიცხვების შედარებას. წინააღმდეგ შემთხვევაში, - რიცხვი გარდაიქმნება სტრიქონად და გამოიყენება სტრიქონების შედარება.

-
-
- -
-

- ტიპების თანმიმდევრულობის შეცდომები ჩაშენებული ფუნქციებისთვის - RFC -

-
-
-
PHP 7
-
- -
-
-
-
-
PHP 8
-
- -
-
-
-
-

შიდა ფუნქციების უმეტესობა უკვე გამორიცხავს Error გამონაკლისს, თუ შეცდომა მოხდა პარამეტრის შემოწმებისას.

-
-
-
- -
-

კომპილაცია Just-In-Time

-

- PHP 8 წარმოგიდგენთ JIT-კომპილაციის ორ მექანიზმს. JIT ტრასირება, მათგან ყველაზე პერსპექტიულია, - სინთეზურ ბენჩმარკზე აჩვენებს მუშაობის გაუმჯობესებას დაახლოებით 3-ჯერ და 1.5-2-ჯერ ზოგიერთ დიდ ხანს მომუშავე აპლიკაციებში. - აპლიკაციის სტანდარტული წარმადობა ერთ და იგივე დონეზეა PHP 7.4-თან. -

-

- JIT-ის შედარებითი წვლილი PHP 8-ის წარმადობაში -

-

- Just-In-Time compilation -

- -
-
-

გაუმჯობესებები ტიპის სისტემაში და შეცდომების დამუშავება

-
    -
  • - ტიპის უფრო მკაცრი შემოწმება არითმეტიკული/ბიტიური ოპერატორებისთვის - RFC -
  • -
  • - აბსტრაქტული თვისებების მეთოდების შემოწმება RFC -
  • -
  • - ჯადოსნური მეთოდების სწორი სიგნატურები RFC -
  • -
  • - ძრავის გაფრთხილებების ხელახალი კლასიფიკაცია RFC -
  • -
  • - ფატალური შეცდომა, როდესაც მეთოდის სიგნატურა შეუთავსებელია RFC -
  • -
  • - @ ოპერატორი აღარ აჩუმებს ფატალურ შეცდომებს. -
  • -
  • - მემკვიდრეობა private მეთოდებთან RFC -
  • -
  • - ახალი ტიპი mixed RFC -
  • -
  • - დაბრუნების ტიპი static RFC -
  • -
  • - ტიპები სტანდარტული ფუნქციებისთვის - Email თემა -
  • -
  • - გაუმჭვირვალე ობიექტები რესურსების ნაცვლად - Curl, - Gd, - Sockets, - OpenSSL, - XMLWriter, and - XML - გაფართოებებისთვის -
  • -
-
-
-

სინტაქსის სხვა გაუმჯობესება

-
    -
  • - მძიმე დაშვებულია პარამეტრების სიის ბოლოს RFC - და use დამოკლების სიაში RFC -
  • -
  • - ბლოკი catch ცვლადის მითითების გარეშე RFC -
  • -
  • - ცვლადის სინტაქსის ცვლილება RFC -
  • -
  • - სახელების სივრცეში სახელები განიხილება, როგორც ერთიამნი ტოკენი RFC -
  • -
  • - გამოსახულება Throw RFC -
  • -
  • - დამატება ::class ობიექტებისთვის RFC -
  • -
- -

ახალი კლასები, ინტერფეისები და ფუნქციები

- -
-
-
- - - - - - - 'PHP 8.0 ist ein Major-Update der Sprache PHP. Es beinhaltet viele neue Funktionen und Optimierungen wie beispielsweise Named Arguments, Union Types, Attribute, Constructor Property Promotion, Match Ausdrücke, Nullsafe Operator, JIT und Verbesserungen des Typen-Systems, der Fehlerbehandlung und der Konsistenz.', + 'documentation' => 'Doc', + 'main_title' => 'Released!', + 'main_subtitle' => 'PHP 8.0 ist ein Major-Update der Sprache PHP.
Es beinhaltet viele neue Funktionen und Optimierungen wie beispielsweise Named Arguments, Union Types, Attribute, Constructor Property Promotion, Match Ausdrücke, Nullsafe Operator, JIT und Verbesserungen des Typen-Systems, der Fehlerbehandlung und der Konsistenz.', + 'upgrade_now' => 'Wechsle jetzt zu PHP 8!', + + 'named_arguments_title' => 'Named Arguments', + 'named_arguments_description' => '
  • Gib nur notwendige Parameter an, überspringe optionale.
  • Parameter sind unabhängig von der Reihenfolge und selbstdokumentierend.
  • ', + 'attributes_title' => 'Attribute', + 'attributes_description' => 'Anstelle von PHPDoc Annotations kannst du nun strukturierte Meta-Daten in nativer PHP Syntax nutzen.', + 'constructor_promotion_title' => 'Constructor Property Promotion', + 'constructor_promotion_description' => 'Weniger Codewiederholungen für das Definieren und Initialisieren von Objektattributen.', + 'union_types_title' => 'Union Types', + 'union_types_description' => 'Anstelle von PHPDoc Annotations für kombinierte Typen kannst du native Union-Type-Deklarationen verwenden, welche zur Laufzeit validiert werden.', + 'match_expression_title' => 'Match Ausdruck', + 'match_expression_description' => '

    Der neue match Ausdruck ist ähnlich wie die switch Anweisung und bietet folgende Funktionen:

    + ', + + 'nullsafe_operator_title' => 'Nullsafe Operator', + 'nullsafe_operator_description' => 'Anstelle von Null-Checks kannst du Funktionsaufrufe nun direkt mit dem neuen Nullsafe Operator aneinanderreihen. Wenn ein Funktionsaufruf innerhalb der Kette Null zurückliefert, wird die weitere Ausführung abgebrochen und die gesamte Kette wird zu Null ausgewertet.', + 'saner_string_number_comparisons_title' => 'Vernünftige String-zu-Zahl Vergleiche', + 'saner_string_number_comparisons_description' => 'Wenn eine Zahl mit einem numerischen String verglichen wird, benutzt PHP 8 einen Zahlen-Vergleich. Andernfalls wird die Zahl zu einem String konvertiert und ein String-Vergleich durchgeführt.', + 'consistent_internal_function_type_errors_title' => 'Konsistente Typen-Fehler für interne Funktionen', + 'consistent_internal_function_type_errors_description' => 'Die meisten internen Funktionen erzeugen nun eine Error Exception wenn die Typenvalidierung der Parameter fehlschlägt.', + + 'jit_compilation_title' => 'Just-In-Time Compiler', + 'jit_compilation_description' => 'PHP 8 führt zwei JIT Compiler Engines ein. Tracing-JIT, der vielversprechendere der beiden, zeigt eine bis zu drei mal bessere Performance in synthetischen Benchmarks und eine 1,5 bis zweifache Verbesserung in einigen speziellen, langlaufenden Anwendungen. Die Performance einer typischen Anwendung ist auf dem Niveau von PHP 7.4.', + 'jit_performance_title' => 'Relativer Beitrag des JIT Compilers zur Performance von PHP 8', + + 'type_improvements_title' => 'Verbesserungen am Typen-System und an der Fehlerbehandlung', + 'arithmetic_operator_type_checks' => 'Striktere Typen-Checks für arithmetische/bitweise Operatoren', + 'abstract_trait_method_validation' => 'Validierung abstrakter Methoden in einem Trait', + 'magic_method_signatures' => 'Korrekte Signaturen magischer Funktionen', + 'engine_warnings' => 'Neue Klassifizierung von Engine-Warnings', + 'lsp_errors' => 'Inkompatiblen Methoden-Signaturen erzeugen einen Fatal Error', + 'at_operator_no_longer_silences_fatal_errors' => 'Der @ Operator unterdrückt keine Fatal Errors mehr.', + 'inheritance_private_methods' => 'Vererbung mit privaten Methoden', + 'mixed_type' => 'mixed Typ', + 'static_return_type' => 'static als Rückgabetyp', + 'internal_function_types' => 'Typen für interne Funktionen', + 'email_thread' => 'E-Mail-Thread', + 'opaque_objects_instead_of_resources' => 'Objekte ohne Methoden anstelle des resource Typs für + Curl, + Gd, + Sockets, + OpenSSL, + XMLWriter, und + XML + Extension', + + 'other_improvements_title' => 'Weitere Syntax-Anpassungen und Verbesserungen', + 'allow_trailing_comma' => 'Erlauben eines abschließenden Kommas in Parameter-Listen RFC + und Closure Use Listen RFC.', + 'non_capturing_catches' => 'Catches ohne Exception-Variable', + 'variable_syntax_tweaks' => 'Anpassungen an der Syntax für Variablen', + 'namespaced_names_as_token' => 'Namespaces werden als ein Token ausgewertet', + 'throw_expression' => 'throw ist jetzt ein Ausdruck', + 'class_name_literal_on_object' => 'Nutzung von ::class auf Objekten', + + 'new_classes_title' => 'Neue Klassen, Interfaces, und Funktionen', + 'weak_map_class' => 'Weak Map Klasse', + 'stringable_interface' => 'Stringable Interface', + 'token_as_object' => 'token_get_all() mit einer Objekt-Implementierung', + 'new_dom_apis' => 'Neue APIs für DOM-Traversal and -Manipulation', + + 'footer_title' => 'Bessere Performance, bessere Syntax, optimierte Typsicherheit.', + 'footer_description' => '

    + Für den direkten Code-Download von PHP 8 schaue bitte auf der Downloads Seite vorbei. + Windows Pakete können auf der PHP für Windows Seite gefunden werden. + Die Liste der Änderungen ist im ChangeLog festgehalten. +

    +

    + Der Migration Guide ist im PHP Manual verfügbar. Lies dort + nach für detaillierte Informationen zu den neuen Funktionen und inkompatiblen Änderungen zu vorherigen PHP + Versionen. +

    ', +]; diff --git a/releases/8.0/languages/en.php b/releases/8.0/languages/en.php new file mode 100644 index 0000000000..a67b978de6 --- /dev/null +++ b/releases/8.0/languages/en.php @@ -0,0 +1,89 @@ + 'PHP 8.0 is a major update of the PHP language. It contains many new features and optimizations including named arguments, union types, attributes, constructor property promotion, match expression, nullsafe operator, JIT, and improvements in the type system, error handling, and consistency.', + 'documentation' => 'Doc', + 'main_title' => 'Released!', + 'main_subtitle' => 'PHP 8.0 is a major update of the PHP language.
    It contains many new features and optimizations including named arguments, union types, attributes, constructor property promotion, match expression, nullsafe operator, JIT, and improvements in the type system, error handling, and consistency.', + 'upgrade_now' => 'Upgrade to PHP 8 now!', + + 'named_arguments_title' => 'Named arguments', + 'named_arguments_description' => '
  • Specify only required parameters, skipping optional ones.
  • Arguments are order-independent and self-documented.
  • ', + 'attributes_title' => 'Attributes', + 'attributes_description' => 'Instead of PHPDoc annotations, you can now use structured metadata with PHP\'s native syntax.', + 'constructor_promotion_title' => 'Constructor property promotion', + 'constructor_promotion_description' => 'Less boilerplate code to define and initialize properties.', + 'union_types_title' => 'Union types', + 'union_types_description' => 'Instead of PHPDoc annotations for a combination of types, you can use native union type declarations that are validated at runtime.', + 'ok' => 'Ok', + 'oh_no' => 'Oh no!', + 'this_is_expected' => 'This is what I expected', + 'match_expression_title' => 'Match expression', + 'match_expression_description' => '

    The new match is similar to switch and has the following features:

    + ', + + 'nullsafe_operator_title' => 'Nullsafe operator', + 'nullsafe_operator_description' => 'Instead of null check conditions, you can now use a chain of calls with the new nullsafe operator. When the evaluation of one element in the chain fails, the execution of the entire chain aborts and the entire chain evaluates to null.', + 'saner_string_number_comparisons_title' => 'Saner string to number comparisons', + 'saner_string_number_comparisons_description' => 'When comparing to a numeric string, PHP 8 uses a number comparison. Otherwise, it converts the number to a string and uses a string comparison.', + 'consistent_internal_function_type_errors_title' => 'Consistent type errors for internal functions', + 'consistent_internal_function_type_errors_description' => 'Most of the internal functions now throw an Error exception if the validation of the parameters fails.', + + 'jit_compilation_title' => 'Just-In-Time compilation', + 'jit_compilation_description' => 'PHP 8 introduces two JIT compilation engines. Tracing JIT, the most promising of the two, shows about 3 times better performance on synthetic benchmarks and 1.5–2 times improvement on some specific long-running applications. Typical application performance is on par with PHP 7.4.', + 'jit_performance_title' => 'Relative JIT contribution to PHP 8 performance', + + 'type_improvements_title' => 'Type system and error handling improvements', + 'arithmetic_operator_type_checks' => 'Stricter type checks for arithmetic/bitwise operators', + 'abstract_trait_method_validation' => 'Abstract trait method validation', + 'magic_method_signatures' => 'Correct signatures of magic methods', + 'engine_warnings' => 'Reclassified engine warnings', + 'lsp_errors' => 'Fatal error for incompatible method signatures', + 'at_operator_no_longer_silences_fatal_errors' => 'The @ operator no longer silences fatal errors.', + 'inheritance_private_methods' => 'Inheritance with private methods', + 'mixed_type' => 'mixed type', + 'static_return_type' => 'static return type', + 'internal_function_types' => 'Types for internal functions', + 'email_thread' => 'Email thread', + 'opaque_objects_instead_of_resources' => 'Opaque objects instead of resources for + Curl, + Gd, + Sockets, + OpenSSL, + XMLWriter, and + XML + extensions', + + 'other_improvements_title' => 'Other syntax tweaks and improvements', + 'allow_trailing_comma' => 'Allow a trailing comma in parameter lists RFC + and closure use lists RFC', + 'non_capturing_catches' => 'Non-capturing catches', + 'variable_syntax_tweaks' => 'Variable Syntax Tweaks', + 'namespaced_names_as_token' => 'Treat namespaced names as single token', + 'throw_expression' => 'throw is now an expression', + 'class_name_literal_on_object' => 'Allow ::class on objects', + + 'new_classes_title' => 'New Classes, Interfaces, and Functions', + 'weak_map_class' => 'Weak Map class', + 'stringable_interface' => 'Stringable interface', + 'new_str_functions' => 'str_contains(), + str_starts_with(), + str_ends_with()', + 'token_as_object' => 'token_get_all() object implementation', + 'new_dom_apis' => 'New DOM Traversal and Manipulation APIs', + + 'footer_title' => 'Better performance, better syntax, improved type safety.', + 'footer_description' => '

    + For source downloads of PHP 8 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.0/languages/es.php b/releases/8.0/languages/es.php new file mode 100644 index 0000000000..7947d4e5ac --- /dev/null +++ b/releases/8.0/languages/es.php @@ -0,0 +1,81 @@ + 'PHP 8.0 es una actualización importante del lenguaje php que contiene nuevos recursos y optimizaciones incluyendo argumentos nombrados, tipos de uniones, atributos, promoción de propiedades constructivas, expresiones de equivalencia, operador nullsafe, JIT (traducción dinámica) y también mejoras en el sistema de tipos, manejo de errores y consistencia en general.', + 'documentation' => 'Doc', + 'main_title' => 'Released!', + 'main_subtitle' => 'PHP 8.0 es una actualización importante del lenguaje PHP que contiene nuevos recursos y optimizaciones incluyendo argumentos nombrados, tipos de uniones, atributos, promoción de propiedades constructivas, expresiones match, operador nullsafe, JIT (traducción dinámica) y también mejoras en el sistema de tipos, manejo de errores y consistencia en general.', + 'upgrade_now' => 'Actualizate a PHP 8!', + + 'named_arguments_title' => 'Argumentos nombrados', + 'named_arguments_description' => '
  • Solamente especifica los parámetros requeridos, omite los opcionales.
  • Los argumentos son independientes del orden y se documentan automáticamente.
  • ', + 'attributes_title' => 'Atributos', + 'attributes_description' => 'En vez de anotaciones en PHPDoc, puedes usar metadatos estructurados con la sintaxis nativa de PHP.', + 'constructor_promotion_title' => 'Promoción de propiedades constructivas', + 'constructor_promotion_description' => 'Menos código repetitivo para definir e inicializar una propiedad.', + 'union_types_title' => 'Tipos de unión', + 'union_types_description' => 'En vez de anotaciones en PHPDoc para combinar tipos, puedes usar una declaración de tipo unión nativa que será validada en el momento de ejecución.', + 'match_expression_title' => 'Expresiones match', + 'match_expression_description' => '

    Las nuevas expresiones match son similares a switch y tienen las siguientes características:

    + ', + + 'nullsafe_operator_title' => 'Operador Nullsafe', + 'nullsafe_operator_description' => 'En vez de verificar condiciones nulas, tu puedes utilizar una cadena de llamadas con el nuevo operador nullsafe. Cuando la evaluación de un elemento falla, la ejecución de la entire cadena es abortada y la cadena entera es evaluada como null.', + 'saner_string_number_comparisons_title' => 'Comparaciones inteligentes entre “strings” y números', + 'saner_string_number_comparisons_description' => 'Cuando comparas con un “string” numérico, PHP8 usa comparación numérica o de otro caso convierte el número a un "string" y asi los compara.', + 'consistent_internal_function_type_errors_title' => 'Errores consistentes para funciones internas.', + 'consistent_internal_function_type_errors_description' => 'La mayoría de las funciones internas ahora proveen un Error de excepción si el parámetro no es validado.', + + 'jit_compilation_title' => 'JIT (traducciones dinámicas)', + 'jit_compilation_description' => 'PHP8 introduce 2 motores de compilación JIT. Transit JIT, es el más prometedor de los dos y performa 3 veces mejor en benchmarks sintéticos y 1.5-2 mejor en algunas aplicaciones específicas a largo plazo. Performancia de aplicaciones típicas es a la par de las de PHP7.4', + 'jit_performance_title' => 'JIT contribuciones al funcionamiento relativo de PHP8', + + 'type_improvements_title' => 'Mejorias en los tipos de sistemas y manejo de errores', + 'arithmetic_operator_type_checks' => 'Verificaciones estrictas de operadores aritméticos/bitwise.', + 'abstract_trait_method_validation' => 'Validación de métodos con características abstractas', + 'magic_method_signatures' => 'Firmas correctas de métodos mágicos', + 'engine_warnings' => 'Reclacificamiento de errores fatales', + 'lsp_errors' => 'Errores fatales incompatibles con el método de firma', + 'at_operator_no_longer_silences_fatal_errors' => 'El operador @ no omitirá errores fatales.', + 'inheritance_private_methods' => 'Herencia con métodos privados', + 'mixed_type' => 'Tipo mixed', + 'static_return_type' => 'Tipo retorno static', + 'internal_function_types' => 'Tipos para funciones internas', + 'email_thread' => 'Email thread', + 'opaque_objects_instead_of_resources' => 'Objetos opacos en ves de recursos para + Curl, + Gd, + Sockets, + OpenSSL, + XMLWriter, + y XML extensiones', + + 'other_improvements_title' => 'Otros ajustes y mejoras del sintax', + 'allow_trailing_comma' => 'Permitir una coma al final de una lista de parámetros RFC + y lista de use en closures RFC', + 'non_capturing_catches' => 'Catches que no capturan', + 'variable_syntax_tweaks' => 'Ajustes al syntax variable', + 'namespaced_names_as_token' => 'Tratamiento de nombres de namespace como tokens únicos', + 'throw_expression' => 'throw es ahora una expresión', + 'class_name_literal_on_object' => 'Permitir ::class on objects', + + 'new_classes_title' => 'Nuevas clases, interfaces y funciones', + 'weak_map_class' => 'Weak Map clase', + 'token_as_object' => 'token_get_all() Implementación de objeto', + 'new_dom_apis' => 'New DOM Traversal and Manipulation APIs', + + 'footer_title' => 'Mejor performancia, mejor syntax, aumentada seguridad de tipos.', + 'footer_description' => '

    + Para bajar el código fuente de PHP8 visita la página downloads. + Código binario para windows lo puedes encontrar en la página PHP for Windows. + La lista de cambios está disponible en la página ChangeLog. +

    +

    + La guía de migración está disponible en el manual de PHP. + Por favor consultala para una lista detallada de alteraciones cambios y compatibilidad. +

    ', +]; diff --git a/releases/8.0/languages/fr.php b/releases/8.0/languages/fr.php new file mode 100644 index 0000000000..18adaaeb4a --- /dev/null +++ b/releases/8.0/languages/fr.php @@ -0,0 +1,82 @@ + "PHP 8.0 est une mise à jour majeure du langage PHP. Elle contient beaucoup de nouvelle fonctionnalités et d'optimisations, incluant les arguments nommés, les types d'union, attributs, promotion de propriétés de constructeur, l'expression match, l'opérateur nullsafe, JIT (Compilation à la Volée), et des améliorations dans le système de typage, la gestion d'erreur, et de cohérence.", + 'documentation' => 'Doc', + 'main_title' => 'Released!', + 'main_subtitle' => 'PHP 8.0 est une mise à jour majeure du langage PHP.
    Elle contient beaucoup de nouvelles fonctionnalités et d\'optimisations, incluant les arguments nommés, les types d\'union, attributs, promotion de propriété de constructeur, l\'expression match, l\'opérateur nullsafe, JIT (Compilation à la Volée), et des améliorations dans le système de typage, la gestion d\'erreur, et de cohérence.', + 'upgrade_now' => 'Migrez à PHP 8 maintenant!', + + 'named_arguments_title' => 'Arguments nommés', + 'named_arguments_description' => '
  • Spécifiez uniquement les paramètres requis, omettant ceux optionnels.
  • Les arguments sont indépendants de l\'ordre et auto-documentés.
  • ', + 'attributes_title' => 'Attributs', + 'attributes_description' => 'Au lieux d\'annotations PHPDoc, vous pouvez désormais utiliser les métadonnées structurés avec la syntaxe native de PHP.', + 'constructor_promotion_title' => 'Promotion de propriétés de constructeur', + 'constructor_promotion_description' => 'Moins de code redondant pour définir et initialiser les propriétés.', + 'union_types_title' => "Types d'union", + 'union_types_description' => "Au lieu d'annotation PHPDoc pour une combinaison de type, vous pouvez utiliser les déclarations de types d'union native qui sont validées lors de l'exécution.", + 'match_expression_title' => 'Expression match', + 'match_expression_description' => '

    La nouvelle instruction match est similaire à switch et a les fonctionnalités suivantes :

    + ', + + 'nullsafe_operator_title' => 'Opérateur Nullsafe', + 'nullsafe_operator_description' => "Au lieu de faire des vérifications conditionnelles de null, vous pouvez utiliser une chaîne d'appel avec le nouvel opérateur nullsafe. Qui lorsque l'évaluation d'un élément de la chaîne échoue, l'exécution de la chaîne complète est terminée et la chaîne entière évalue à null.", + 'saner_string_number_comparisons_title' => 'Comparaisons entre les chaînes de caractères et les nombres plus saines', + 'saner_string_number_comparisons_description' => 'Lors de la comparaison avec une chaîne numérique, PHP 8 utilise une comparaison de nombre. Sinon, il convertit le nombre à une chaîne de caractères et utilise une comparaison de chaîne de caractères.', + 'consistent_internal_function_type_errors_title' => 'Erreurs de type cohérent pour les fonctions internes', + 'consistent_internal_function_type_errors_description' => 'La plupart des fonctions internes lancent désormais une exception Error si la validation du paramètre échoue.', + + 'jit_compilation_title' => 'Compilation Juste-à-Temps (JIT)', + 'jit_compilation_description' => "PHP 8 introduit deux moteurs de compilation JIT (juste à temps/compilation à la volée). Le Tracing JIT, le plus prometteur des deux, montre environ 3 fois plus de performances sur des benchmarks synthétiques et 1,5-2 fois plus de performances sur certaines applications à longue durée d'exécution. Généralement les performances des applications sont identiques à PHP 7.4.", + 'jit_performance_title' => 'Contribution relative du JIT à la performance de PHP 8', + + 'type_improvements_title' => "Amélioration du système de typage et de la gestion d'erreur", + 'arithmetic_operator_type_checks' => 'Vérification de type plus sévère pour les opérateurs arithmétiques et bit à bit', + 'abstract_trait_method_validation' => 'Validation de méthode abstraite des traits', + 'magic_method_signatures' => 'Signature valide des méthodes magiques', + 'engine_warnings' => 'Reclassifications des avertissements du moteur', + 'lsp_errors' => 'Erreur fatale pour des signatures de méthodes incompatibles', + 'at_operator_no_longer_silences_fatal_errors' => "L'opérateur @ ne silence plus les erreurs fatales.", + 'inheritance_private_methods' => 'Héritages avec les méthodes privées', + 'mixed_type' => 'Type mixed', + 'static_return_type' => 'Type de retour static', + 'internal_function_types' => 'Types pour les fonctions internes', + 'email_thread' => 'Discussion e-mail', + 'opaque_objects_instead_of_resources' => 'Objets opaques au lieu de ressources pour les extensions + Curl, + Gd, + Sockets, + OpenSSL, + XMLWriter, et + XML', + + 'other_improvements_title' => 'Autres ajustements de syntaxe et améliorations', + 'allow_trailing_comma' => 'Autorisation des virgules trainantes dans les listes de paramètres RFC + et dans les listes des use d\'une fermeture RFC', + 'non_capturing_catches' => 'Les catchs non capturant', + 'variable_syntax_tweaks' => 'Ajustement de la Syntaxe des Variables', + 'namespaced_names_as_token' => 'Traite les noms des espaces de nom comme un seul token', + 'throw_expression' => 'throw est désormais une expression', + 'class_name_literal_on_object' => 'Autorisation de ::class sur les objets', + + 'new_classes_title' => 'Nouvelles Classes, Interfaces, et Fonctions', + 'weak_map_class' => 'Classe Weak Map', + 'stringable_interface' => 'Interface Stringable', + 'token_as_object' => 'Implémentation objet de token_get_all()', + 'new_dom_apis' => 'Nouvelles APIs pour traverser et manipuler le DOM', + + 'footer_title' => 'Meilleures performances, meilleure syntaxe, amélioration de la sécurité de type.', + 'footer_description' => '

    + Pour le téléchargement des sources de PHP 8 veuillez visiter la page de téléchargement. + Les binaires Windows peuvent être trouvés sur le site de PHP pour Windows. + La liste des changements est notée dans le ChangeLog. +

    +

    + Le guide de migration est disponible dans le manuel PHP. + Veuillez le consulter pour une liste détaillée des nouvelles fonctionnalités et changements non rétrocompatibles. +

    ', +]; diff --git a/releases/8.0/languages/it.php b/releases/8.0/languages/it.php new file mode 100644 index 0000000000..77d3420e46 --- /dev/null +++ b/releases/8.0/languages/it.php @@ -0,0 +1,82 @@ + 'PHP 8.0 è una nuova versione major del linguaggio PHP. Contiene molte nuove funzionalità ed ottimizzazioni quali i named arguments, la definizione di tipi unione, gli attributi, la promozione a proprietà degli argomenti del costruttore, l\'espressione match, l\'operatore nullsafe, la compilazione JIT e miglioramenti al sistema dei tipi, alla gestione degli errori e alla consistenza.', + 'documentation' => 'Doc', + 'main_title' => 'Released!', + 'main_subtitle' => 'PHP 8.0 è una nuova versione major del linguaggio PHP.
    Contiene molte nuove funzionalità ed ottimizzazioni quali i named arguments, la definizione di tipi unione, gli attributi, la promozione a proprietà degli argomenti del costruttore, l\'espressione match, l\'operatore nullsafe, la compilazione JIT e miglioramenti al sistema dei tipi, alla gestione degli errori e alla consistenza.', + 'upgrade_now' => 'Aggiorna a PHP 8!', + + 'named_arguments_title' => 'Named arguments', + 'named_arguments_description' => '
  • Indica solamente i parametri richiesti, saltando quelli opzionali.
  • Gli argomenti sono indipendenti dall\'ordine e auto-documentati.
  • ', + 'attributes_title' => 'Attributi', + 'attributes_description' => 'Invece delle annotazioni PHPDoc, ora puoi usare metadati strutturati nella sintassi nativa PHP.', + 'constructor_promotion_title' => 'Promozione a proprietà degli argomenti del costruttore', + 'constructor_promotion_description' => 'Meno ripetizioni di codice per definire ed inizializzare le proprietà.', + 'union_types_title' => 'Tipi unione', + 'union_types_description' => 'Invece di indicare una combinazione di tipi con le annotazioni PHPDoc, puoi usare una dichiarazione nativa di tipo unione che viene validato durante l\'esecuzione.', + 'match_expression_title' => 'Espressione match', + 'match_expression_description' => '

    La nuova espressione match è simile allo switch e ha le seguenti funzionalità:

    + ', + + 'nullsafe_operator_title' => 'Operatore nullsafe', + 'nullsafe_operator_description' => "Invece di controllare la presenza di un null, puoi ora usare una catena di chiamate con il nuovo operatore nullsafe. Quando la valutazione di un elemento della catena fallisce, l'esecuzione della catena si interrompe e l'intera catena restituisce il valore null.", + 'saner_string_number_comparisons_title' => 'Comparazioni più coerenti di stringhe e numeri', + 'saner_string_number_comparisons_description' => 'Nella comparazione di una stringa numerica, PHP 8 usa la comparazione numerica. Altrimenti, converte il numero in una stringa e usa la comparazione tra stringhe.', + 'consistent_internal_function_type_errors_title' => 'Tipi di errori consistenti per le funzioni native', + 'consistent_internal_function_type_errors_description' => 'La maggior parte delle funzioni native ora lanciano una eccezione Error se la validazione degli argomenti fallisce.', + + 'jit_compilation_title' => 'Compilazione Just-In-Time', + 'jit_compilation_description' => 'PHP 8 intrduce due motori di compilazione JIT. Tracing JIT, il più promettente dei due, mostra delle prestazioni 3 volte superiori nei benchmarks sintetici e 1.5–2 volte superiori per alcuni specifici processi applicativi a lunga esecuzione. Le prestazioni delle tipiche applicazioni web sono al pari con PHP 7.4.', + 'jit_performance_title' => 'Miglioramenti delle performance in PHP 8 grazie a JIT', + + 'type_improvements_title' => 'Sistema dei tipi e miglioramenti alla gestione degli errori', + 'arithmetic_operator_type_checks' => 'Controlli più stringenti per gli operatori aritmetici e bitwise', + 'abstract_trait_method_validation' => 'Validazione dei metodi astratti nei trait', + 'magic_method_signatures' => 'Firme corrette nei metodi magici', + 'engine_warnings' => 'Riclassificazione degli errori', + 'lsp_errors' => 'Errori fatali per firme di metodi non compatibili', + 'at_operator_no_longer_silences_fatal_errors' => "L'operatore @ non silenzia più gli errori fatali.", + 'inheritance_private_methods' => 'Ereditarietà e metodi privati', + 'mixed_type' => 'Tipo mixed', + 'static_return_type' => 'Tipo di ritorno static', + 'internal_function_types' => 'Tipi per le funzioni native', + 'email_thread' => 'Email thread', + 'opaque_objects_instead_of_resources' => 'Oggetti opachi invece che risorse per le estensioni + Curl, + Gd, + Sockets, + OpenSSL, + XMLWriter, e + XML', + + 'other_improvements_title' => 'Altre ritocchi e migliorie di sintassi', + 'allow_trailing_comma' => 'Permessa una virgola finale nella lista dei parametri RFC + e nell\'espressione use per le closure RFC', + 'non_capturing_catches' => 'Catch senza argomento', + 'variable_syntax_tweaks' => 'Correzioni alla sintassi di variabile', + 'namespaced_names_as_token' => 'Trattamento dei nomi di namespace come un singolo token', + 'throw_expression' => "throw è ora un'espressione", + 'class_name_literal_on_object' => "Permesso l'utilizzo di ::class sugli oggetti", + + 'new_classes_title' => 'Nuove classi, interfacce e funzioni', + 'weak_map_class' => 'Classe Weak Map', + 'stringable_interface' => 'Interfaccia Stringable', + 'token_as_object' => 'Classe PhpToken come alternativa a token_get_all()', + 'new_dom_apis' => 'New DOM Traversal and Manipulation APIs', + + 'footer_title' => 'Performance migliorate, migliore sintassi, e migliore sicurezza dei tipi.', + 'footer_description' => '

    + Per scaricare il codice sorgente visita di PHP 8 visita la pagina di download. + I binari eseguibili per Windows possono essere trovati sul sito PHP for Windows. + Una lista dei cambiamenti è registrata nel ChangeLog. +

    +

    + La guida alla migrazione è disponibile nel manuale PHP. + Consultatelo per una lista completa delle nuove funzionalità e dei cambiamenti non retrocompatibili. +

    ', +]; diff --git a/releases/8.0/languages/ja.php b/releases/8.0/languages/ja.php new file mode 100644 index 0000000000..aab61bbe99 --- /dev/null +++ b/releases/8.0/languages/ja.php @@ -0,0 +1,83 @@ + 'PHP 8.0 は、PHP 言語のメジャーアップデートです。このアップデートには、たくさんの新機能や最適化が含まれています。たとえば名前付き引数、union 型、アトリビュート、コンストラクタでのプロパティのプロモーション、match 式、 nullsafe 演算子、JIT、型システムの改善、エラーハンドリング、一貫性の向上などです。', + 'documentation' => 'Doc', + 'main_title' => 'Released!', + 'main_subtitle' => 'PHP 8.0 は、PHP 言語のメジャーアップデートです。
    このアップデートには、たくさんの新機能や最適化が含まれています。たとえば 名前付き引数、 union 型、アトリビュート、コンストラクタでのプロパティのプロモーション、match 式、nullsafe 演算子、JIT、型システムの改善、エラーハンドリング、一貫性の向上などです。', + 'upgrade_now' => 'PHP 8 にアップデートしよう!', + + 'named_arguments_title' => '名前付き引数', + 'named_arguments_description' => '
  • 必須の引数だけを指定し、オプションの引数はスキップしています。
  • 引数の順番に依存せず、自己文書化(self-documented)されています。
  • ', + 'attributes_title' => 'アトリビュート', + 'attributes_description' => 'PHPDoc のアノテーションの代わりに、PHP ネイティブの文法で構造化されたメタデータを扱えるようになりました。', + 'constructor_promotion_title' => 'コンストラクタでの、プロパティのプロモーション', + 'constructor_promotion_description' => 'ボイラープレートのコードを減らすため、コンストラクタでプロパティを定義し、初期化します。', + 'union_types_title' => 'Union 型', + 'union_types_description' => 'PHPDoc のアノテーションを使って型を組み合わせる代わりに、実行時に検証が行われる union型 をネイティブで使えるようになりました。', + 'match_expression_title' => 'Match 式', + 'match_expression_description' => '

    matchswitch 文に似ていますが、以下の機能があります:

    + ', + + 'nullsafe_operator_title' => 'Nullsafe 演算子', + 'nullsafe_operator_description' => 'null チェックの条件を追加する代わりに、nullsafe演算子 を使って呼び出しをチェインさせられるようになりました。呼び出しチェインのひとつが失敗すると、チェインの実行全体が停止し、null と評価されます。', + 'saner_string_number_comparisons_title' => '数値と文字列の比較', + 'saner_string_number_comparisons_description' => '数値形式の文字列と比較する場合は、PHP 8 は数値として比較を行います。それ以外の場合は、数値を文字列に変換し、文字列として比較を行います。', + 'consistent_internal_function_type_errors_title' => '内部関数の型に関するエラーが一貫したものに', + 'consistent_internal_function_type_errors_description' => 'ほとんどの内部関数は、引数の検証に失敗すると Error 例外をスローするようになりました。', + + 'jit_compilation_title' => 'JIT (ジャストインタイム) コンパイル', + 'jit_compilation_description' => 'PHP 8 は JITコンパイル のエンジンをふたつ搭載しています。トレーシングJITは、もっとも有望なふたつの人工的なベンチマークで、約3倍のパフォーマンスを示しました。また、長期間動いている特定のあるアプリケーションでは、1.5-2倍のパフォーマンス向上が見られました。典型的なアプリケーションのパフォーマンスは、PHP 7.4 と同等でした。', + 'jit_performance_title' => 'PHP 8 のパフォーマンスに対するJITの貢献', + + 'type_improvements_title' => '型システムとエラーハンドリングの改善', + 'arithmetic_operator_type_checks' => '算術/ビット演算子のより厳密な型チェック', + 'abstract_trait_method_validation' => 'トレイトの抽象メソッドの検証', + 'magic_method_signatures' => 'マジックメソッドのシグネチャ', + 'engine_warnings' => 'エンジンの警告を整理', + 'lsp_errors' => '互換性のないメソッドシグネチャは fatal error に。', + 'at_operator_no_longer_silences_fatal_errors' => '@ 演算子は、致命的なエラーを隠さなくなりました。', + 'inheritance_private_methods' => 'private メソッドの継承時のシグネチャチェック', + 'mixed_type' => 'mixed 型のサポート', + 'static_return_type' => '戻り値で static 型をサポート', + 'internal_function_types' => '内部関数に型アノテーション', + 'email_thread' => 'Email thread', + 'opaque_objects_instead_of_resources' => '一部の拡張機能が、リソースからオブジェクトに移行: + Curl, + Gd, + Sockets, + OpenSSL, + XMLWriter, + XML', + + 'other_improvements_title' => 'その他文法の調整や改善', + 'allow_trailing_comma' => '引数やクロージャーのuseリストの最後にカンマがつけられるように RFC + RFC', + 'non_capturing_catches' => 'catch で例外のキャプチャが不要に', + 'variable_syntax_tweaks' => '変数の文法の調整', + 'namespaced_names_as_token' => '名前空間の名前を単一のトークンとして扱う', + 'throw_expression' => 'throw は式になりました', + 'class_name_literal_on_object' => 'オブジェクトに対して ::class が使えるように', + + 'new_classes_title' => '新しいクラス、インターフェイス、関数', + 'weak_map_class' => 'Weak Map クラス', + 'stringable_interface' => 'Stringable インターフェイス', + 'token_as_object' => 'token_get_all() をオブジェクトベースで実装', + 'new_dom_apis' => 'New DOM Traversal and Manipulation APIs', + + 'footer_title' => 'パフォーマンスの向上、より良い文法、型システムの改善', + 'footer_description' => '

    + PHP 8 のソースコードのダウンロードは、 + downloads のページをどうぞ。 + Windows 用のバイナリは PHP for Windows のページにあります。 + 変更の一覧は ChangeLog にあります。 +

    +

    + 移行ガイド が PHP マニュアルで利用できます。 + 新機能や下位互換性のない変更の詳細については、移行ガイドを参照して下さい。 +

    ', +]; diff --git a/releases/8.0/languages/ka.php b/releases/8.0/languages/ka.php new file mode 100644 index 0000000000..de0615c1da --- /dev/null +++ b/releases/8.0/languages/ka.php @@ -0,0 +1,84 @@ + 'PHP 8.0 — PHP ენის დიდი განახლება. ის შეიცავს ბევრ ახალ შესაძლებლობას და ოპტიმიზაციებს, მათ შორის დასახელებული არგუმენტები, union type, ატრიბუტები, თვისებების გამარტივებული განსაზღვრა კონსტრუქტორში, გამოსახულება match, ოპერატორი nullsafe, JIT და გაუმჯობესებები ტიპის სისტემაში, შეცდომების დამუშავება და თანმიმდევრულობა.', + 'documentation' => 'დოკუმენტაცია', + 'main_title' => 'რელიზი!', + 'main_subtitle' => 'PHP 8.0 — PHP ენის დიდი განახლება.
    ის შეიცავს ბევრ ახალ შესაძლებლობას და ოპტიმიზაციებს, მათ შორის დასახელებული არგუმენტები, union type, ატრიბუტები, თვისებების გამარტივებული განსაზღვრა კონსტრუქტორში, გამოსახულება match, ოპერატორი nullsafe, JIT და გაუმჯობესებები ტიპის სისტემაში, შეცდომების დამუშავება და თანმიმდევრულობა.', + 'upgrade_now' => 'გადადით PHP 8-ზე!', + + 'named_arguments_title' => 'დასახელებული არგუმენტები', + 'named_arguments_description' => '
  • მიუთითეთ მხოლოდ საჭირო პარამეტრები, გამოტოვეთ არასავალდებულო.
  • არგუმენტების თანმიმდევრობა არ არის მნიშვნელოვანი, არგუმენტები თვითდოკუმენტირებადია.
  • ', + 'attributes_title' => 'Attributes', + 'attributes_description' => 'PHPDoc ანოტაციების ნაცვლად, შეგიძლიათ გამოიყენოთ სტრუქტურული მეტამონაცემები ნატიური PHP სინტაქსით.', + 'constructor_promotion_title' => 'თვისებების განახლება კონსტრუქტორში', + 'constructor_promotion_description' => 'ნაკლები შაბლონური კოდი თვისებების განსაზღვრისა და ინიციალიზაციისთვის.', + 'union_types_title' => 'Union types', + 'union_types_description' => 'PHPDoc ანოტაციების ნაცვლად, გაერთიანებული ტიპებისთვის შეგიძლიათ გამოიყენოთ განცხადება union type, რომლებიც მოწმდება შესრულების დროს.', + 'ok' => 'შეცდომები არაა', + 'oh_no' => 'ოოო არა!', + 'this_is_expected' => 'ის, რასაც მე ველოდი', + 'match_expression_title' => 'გამოსახულება Match', + 'match_expression_description' => '

    ახალი გამოსახულება match, switch ოპერატორის მსგავსია შემდეგი მახასიათებლებით:

    + ', + + 'nullsafe_operator_title' => 'ოპერატორი Nullsafe', + 'nullsafe_operator_description' => 'null-ის შემოწმების ნაცვლად, შეგიძლიათ გამოიყენოთ გამოძახების თანმიმდევრობა ახალ Nullsafe ოპერატორით. როდესაც ერთ-ერთი ელემენტი თანმიმდევრობაში აბრუნებს null-ს, შესრულება ჩერდება და მთელი თანმიმდევრობა აბრუნებს null-ს.', + 'saner_string_number_comparisons_title' => 'სტრიქონებისა და რიცხვების გაუმჯობესებული შედარება', + 'saner_string_number_comparisons_description' => 'PHP 8 რიცხვითი სტრიქონის შედარებისას იყენებს რიცხვების შედარებას. წინააღმდეგ შემთხვევაში, რიცხვი გარდაიქმნება სტრიქონად და გამოიყენება სტრიქონების შედარება.', + 'consistent_internal_function_type_errors_title' => 'ტიპების თანმიმდევრულობის შეცდომები ჩაშენებული ფუნქციებისთვის', + 'consistent_internal_function_type_errors_description' => 'შიდა ფუნქციების უმეტესობა უკვე გამორიცხავს Error გამონაკლისს, თუ შეცდომა მოხდა პარამეტრის შემოწმებისას.', + + 'jit_compilation_title' => 'კომპილაცია Just-In-Time', + 'jit_compilation_description' => 'PHP 8 წარმოგიდგენთ JIT-კომპილაციის ორ მექანიზმს. JIT ტრასირება, მათგან ყველაზე პერსპექტიულია, სინთეზურ ბენჩმარკზე აჩვენებს მუშაობის გაუმჯობესებას დაახლოებით 3-ჯერ და 1.5-2-ჯერ ზოგიერთ დიდ ხანს მომუშავე აპლიკაციებში. აპლიკაციის სტანდარტული წარმადობა ერთ და იგივე დონეზეა PHP 7.4-თან.', + 'jit_performance_title' => 'JIT-ის შედარებითი წვლილი PHP 8-ის წარმადობაში', + + 'type_improvements_title' => 'გაუმჯობესებები ტიპის სისტემაში და შეცდომების დამუშავება', + 'arithmetic_operator_type_checks' => 'ტიპის უფრო მკაცრი შემოწმება არითმეტიკული/ბიტიური ოპერატორებისთვის', + 'abstract_trait_method_validation' => 'აბსტრაქტული თვისებების მეთოდების შემოწმება', + 'magic_method_signatures' => 'ჯადოსნური მეთოდების სწორი სიგნატურები', + 'engine_warnings' => 'ძრავის გაფრთხილებების ხელახალი კლასიფიკაცია', + 'lsp_errors' => 'ფატალური შეცდომა, როდესაც მეთოდის სიგნატურა შეუთავსებელია', + 'at_operator_no_longer_silences_fatal_errors' => '@ ოპერატორი აღარ აჩუმებს ფატალურ შეცდომებს.', + 'inheritance_private_methods' => 'მემკვიდრეობა private მეთოდებთან', + 'mixed_type' => 'ახალი ტიპი mixed', + 'static_return_type' => 'დაბრუნების ტიპი static', + 'internal_function_types' => 'ტიპები სტანდარტული ფუნქციებისთვის', + 'email_thread' => 'Email თემა', + 'opaque_objects_instead_of_resources' => 'გაუმჭვირვალე ობიექტები რესურსების ნაცვლად + Curl, + Gd, + Sockets, + OpenSSL, + XMLWriter, and + XML + გაფართოებებისთვის', + + 'other_improvements_title' => 'სინტაქსის სხვა გაუმჯობესება', + 'allow_trailing_comma' => 'მძიმე დაშვებულია პარამეტრების სიის ბოლოს RFC + და use დამოკლების სიაში RFC', + 'non_capturing_catches' => 'ბლოკი catch ცვლადის მითითების გარეშე', + 'variable_syntax_tweaks' => 'ცვლადის სინტაქსის ცვლილება', + 'namespaced_names_as_token' => 'სახელების სივრცეში სახელები განიხილება, როგორც ერთიამნი ტოკენი', + 'throw_expression' => 'გამოსახულება throw', + 'class_name_literal_on_object' => 'დამატება ::class ობიექტებისთვის', + + 'new_classes_title' => 'ახალი კლასები, ინტერფეისები და ფუნქციები', + 'token_as_object' => 'token_get_all() ობიექტზე-ორიენტირებული ფუნქცია', + 'new_dom_apis' => 'ახალი API-ები DOM-ის გადასასვლელად და დასამუშავებლად', + + 'footer_title' => 'უკეთესი წარმადობა, უკეთესი სინტაქსი, უფრო საიმედო ტიპების სისტემა.', + 'footer_description' => '

    + PHP 8 წყაროს კოდის ჩამოსატვირთად ეწვიეთ ჩამოტვირთვის გვერდს. + Windows-ის ბინარული ფაილები განთავსებულია საიტზე PHP Windows-თვის. + ცვლილებების სია წარმოდგენილია ChangeLog-ში. +

    +

    + მიგრაციის გზამკვლევი ხელმისაწვდომია დოკუმენტაციის განყოფილებაში. გთხოვთ, + შეისწავლოთ იგი ახალი ფუნქციების დეტალური ჩამონათვალის მისაღებად და უკუ შეუთავსებელი ცვლილებებისთვის. +

    ', +]; diff --git a/releases/8.0/languages/nl.php b/releases/8.0/languages/nl.php new file mode 100644 index 0000000000..af1630978e --- /dev/null +++ b/releases/8.0/languages/nl.php @@ -0,0 +1,81 @@ + 'PHP 8.0 is een omvangrijke update van de PHP programmeertaal. Het bevat veel nieuwe mogelijkheden en optimalisaties, waaronder argument naamgeving, unie types, attributen, promotie van constructor eigenschappen, expressie vergelijking, null-veilige operator, JIT, en verbeteringen aan het type systeem, foute afhandeling, en consistentie.', + 'documentation' => 'Doc', + 'main_title' => 'Beschikbaar!', + 'main_subtitle' => 'PHP 8.0 is een omvangrijke update van de PHP programmeertaal.
    Het bevat veel nieuwe mogelijkheden en optimalisaties, waaronder argument naamgeving, unie types, attributen, promotie van constructor eigenschappen, expressie vergelijking, null-veilige operator, JIT, en verbeteringen aan het type systeem, foute afhandeling, en consistentie.', + 'upgrade_now' => 'Update naar PHP 8!', + + 'named_arguments_title' => 'Argument naamgeving', + 'named_arguments_description' => '
  • Geef enkel vereiste parameters op, sla optionele parameters over.
  • Argumenten hebben een onafhankelijke volgorde en documenteren zichzelf.
  • ', + 'attributes_title' => 'Attributen', + 'attributes_description' => 'In plaats van met PHPDoc annotaties kan je nu gestructureerde metadata gebruiken in PHP\'s eigen syntaxis.', + 'constructor_promotion_title' => 'Promotie van constructor eigenschappen', + 'constructor_promotion_description' => 'Minder standaardcode nodig om eigenschappen te definiëren en initialiseren.', + 'union_types_title' => 'Unie types', + 'union_types_description' => 'In plaats van met PHPDoc annotaties kan je de mogelijke types via unie types declareren zodat deze ook gevalideerd worden tijdens de runtime.', + 'match_expression_title' => 'Expressie vergelijking', + 'match_expression_description' => '

    De nieuwe match is gelijkaardig aan switch en heeft volgende eigenschappen:

    + ', + + 'nullsafe_operator_title' => 'Null-veilige operator', + 'nullsafe_operator_description' => 'In plaats van een controle op null uit te voeren kan je nu een ketting van oproepen vormen met de null-veilige operator. Wanneer één expressie in de ketting faalt, zal de rest van de ketting niet uitgevoerd worden en is het resultaat van de hele ketting null.', + 'saner_string_number_comparisons_title' => 'Verstandigere tekst met nummer vergelijkingen', + 'saner_string_number_comparisons_description' => 'Wanneer PHP 8 een vergelijking uitvoert tegen een numerieke tekst zal er een numerieke vergelijking uitgevoerd worden. Anders zal het nummer naar een tekst omgevormd worden en er een tekstuele vergelijking uitgevoerd worden.', + 'consistent_internal_function_type_errors_title' => 'Consistente type fouten voor interne functies', + 'consistent_internal_function_type_errors_description' => 'De meeste interne functies gooien nu een Error exception als de validatie van parameters faalt.', + + 'jit_compilation_title' => 'Just-In-Time compilatie', + 'jit_compilation_description' => 'PHP 8 introduceert twee systemen voor JIT compilatie. De tracerende JIT is veelbelovend en presteert ongeveer 3 keer beter bij synthetische metingen en kan sommige langlopende applicaties 1.5–2 keer verbeteren. Prestaties van typische web applicaties ligt in lijn met PHP 7.4.', + 'jit_performance_title' => 'Relatieve JIT bijdrage aan de prestaties van PHP 8', + + 'type_improvements_title' => 'Type systeem en verbeteringen van de fout afhandeling', + 'arithmetic_operator_type_checks' => 'Strikte type controles bij rekenkundige/bitsgewijze operatoren', + 'abstract_trait_method_validation' => 'Validatie voor abstracte trait methodes', + 'magic_method_signatures' => 'Correcte signatures bij magic methods', + 'engine_warnings' => 'Herindeling van de engine warnings', + 'lsp_errors' => 'Fatal error bij incompatibele method signatures', + 'at_operator_no_longer_silences_fatal_errors' => 'De @ operator werkt niet meer bij het onderdrukken van fatale fouten.', + 'inheritance_private_methods' => 'Overerving bij private methods', + 'mixed_type' => 'mixed type', + 'static_return_type' => 'static return type', + 'internal_function_types' => 'Types voor interne functies', + 'email_thread' => 'Email draadje', + 'opaque_objects_instead_of_resources' => 'Opaque objects in plaats van resources voor + Curl, + Gd, + Sockets, + OpenSSL, + XMLWriter, and + XML + extensies', + + 'other_improvements_title' => 'Andere syntaxis aanpassingen en verbeteringen', + 'allow_trailing_comma' => 'Sta toe om een komma te plaatsen bij het laatste parameter in een lijst RFC + en bij de use in closures RFC', + 'non_capturing_catches' => 'Catches die niets vangen', + 'variable_syntax_tweaks' => 'Variabele Syntaxis Aanpassingen', + 'namespaced_names_as_token' => 'Namespaced namen worden als één enkel token afgehandeld', + 'throw_expression' => 'throw is nu een expressie', + 'class_name_literal_on_object' => '::class werkt bij objecten', + + 'new_classes_title' => 'Nieuwe Classes, Interfaces, en Functies', + 'token_as_object' => 'token_get_all() object implementatie', + 'new_dom_apis' => 'New DOM Traversal and Manipulation APIs', + + 'footer_title' => 'Betere prestaties, betere syntaxis, verbeterd type systeem.', + 'footer_description' => '

    + Ga naar de downloads pagina om de PHP 8 code te verkrijgen. + Uitvoerbare bestanden voor Windows kan je vinden op de PHP voor Windows website. + De volledige lijst met wijzigingen is vastgelegd in een ChangeLog. +

    +

    + De migratie gids is beschikbaar in de PHP Handleiding. Gebruik + deze om een gedetailleerde lijst te krijgen van nieuwe opties en neerwaarts incompatibele aanpassingen. +

    ', +]; diff --git a/releases/8.0/languages/pt_BR.php b/releases/8.0/languages/pt_BR.php new file mode 100644 index 0000000000..4af6ac2049 --- /dev/null +++ b/releases/8.0/languages/pt_BR.php @@ -0,0 +1,88 @@ + 'PHP 8.0 é uma atualização importante da linguagem PHP. Ela contém muitos novos recursos e otimizações, incluindo argumentos nomeados, união de tipos, atributos, promoção de propriedade do construtor, expressão match, operador nullsafe, JIT e melhorias no sistema de tipos, tratamento de erros e consistência.', + 'documentation' => 'Doc', + 'main_title' => 'Released!', + 'main_subtitle' => 'PHP 8.0 é uma atualização importante da linguagem PHP.
    Ela contém muitos novos recursos e otimizações, incluindo argumentos nomeados, união de tipos, atributos, promoção de propriedade do construtor, expressão match, operador nullsafe, JIT e melhorias no sistema de tipos, tratamento de erros e consistência.', + 'upgrade_now' => 'Atualize para o PHP 8!', + + 'named_arguments_title' => 'Argumentos nomeados', + 'named_arguments_description' => '
  • Especifique apenas os parâmetros obrigatórios, pulando os opcionais.
  • Os argumentos são independentes da ordem e autodocumentados.
  • ', + 'attributes_title' => 'Atributos', + 'attributes_description' => 'Em vez de anotações PHPDoc, agora você pode usar metadados estruturados com a sintaxe nativa do PHP.', + 'constructor_promotion_title' => 'Promoção de propriedade de construtor', + 'constructor_promotion_description' => 'Menos código boilerplate para definir e inicializar propriedades.', + 'union_types_title' => 'União de tipos', + 'union_types_description' => 'Em vez de anotações PHPDoc para uma combinação de tipos, você pode usar declarações de união de tipos nativa que são validados em tempo de execução', + 'match_expression_title' => 'Expressão match', + 'match_expression_description' => '

    A nova expressão match é semelhante ao switch e tem os seguintes recursos:

    + ', + + 'nullsafe_operator_title' => 'Operador nullsafe', + 'nullsafe_operator_description' => 'Em vez de verificar condições nulas, agora você pode usar uma cadeia de chamadas com o novo operador nullsafe. Quando a avaliação de um elemento da cadeia falha, a execução de toda a cadeia é abortada e toda a cadeia é avaliada como nula.', + 'saner_string_number_comparisons_title' => 'Comparações mais inteligentes entre strings e números', + 'saner_string_number_comparisons_description' => 'Ao comparar com uma string numérica, o PHP 8 usa uma comparação numérica. Caso contrário, ele converte o número em uma string e usa uma comparação de string.', + 'consistent_internal_function_type_errors_title' => 'Erros consistentes para tipos de dados em funções internas', + 'consistent_internal_function_type_errors_description' => 'A maioria das funções internas agora lançam uma exceção Error se a validação do parâmetro falhar.', + + 'jit_compilation_title' => 'Compilação Just-In-Time', + 'jit_compilation_description' => 'PHP 8 apresenta dois motores de compilação JIT. Tracing JIT, o mais promissor dos dois, mostra desempenho cerca de 3 vezes melhor em benchmarks sintéticos e melhoria de 1,5 a 2 vezes em alguns aplicativos específicos de longa execução. O desempenho típico das aplicações está no mesmo nível do PHP 7.4.', + 'jit_performance_title' => 'Relative JIT contribution to PHP 8 performance', + + 'type_improvements_title' => 'Melhorias no sistema de tipo e tratamento de erros', + 'arithmetic_operator_type_checks' => 'Verificações de tipo mais rígidas para operadores aritméticos / bit a bit', + 'abstract_trait_method_validation' => 'Validação de método abstrato em traits', + 'magic_method_signatures' => 'Assinaturas corretas de métodos mágicos', + 'engine_warnings' => 'Avisos de motor reclassificados', + 'lsp_errors' => 'Erro fatal para assinaturas de método incompatíveis', + 'at_operator_no_longer_silences_fatal_errors' => 'O operador @ não silencia mais os erros fatais.', + 'inheritance_private_methods' => 'Herança com métodos privados', + 'mixed_type' => 'Tipo mixed', + 'static_return_type' => 'Tipo de retorno static', + 'internal_function_types' => 'Tipagem de funções internas', + 'email_thread' => 'Discussão por email', + 'opaque_objects_instead_of_resources' => 'Objetos opacos em vez de recursos para + Curl, + Gd, + Sockets, + OpenSSL, + XMLWriter, e + XML + extensões', + + 'other_improvements_title' => 'Outros ajustes e melhorias de sintaxe', + 'allow_trailing_comma' => 'Permitir vírgula no final da lista de parâmetros RFC + e listas de uso em closures RFC', + 'non_capturing_catches' => 'Catches sem variável na captura de exceção', + 'variable_syntax_tweaks' => 'Ajustes de sintaxe para variáveis', + 'namespaced_names_as_token' => 'Tratamento de nomes de namespace como token único', + 'throw_expression' => 'throw como expressão', + 'class_name_literal_on_object' => 'Permitir ::class em objetos', + + 'new_classes_title' => 'Novas classes, interfaces e funções', + 'weak_map_class' => 'Classe Weak Map', + 'stringable_interface' => 'Interface Stringable', + 'token_as_object' => 'token_get_all() implementado com objetos', + 'new_dom_apis' => 'New DOM Traversal and Manipulation APIs', + + 'footer_title' => 'Obtenha melhoria de desempenho gratuita. + Obtenha melhor sintaxe.
    + Obtenha mais segurança de tipos.', + 'footer_description' => '

    + Para downloads do código-fonte do PHP 8, visite a página de + downloads. + Os binários do Windows podem ser encontrados na página PHP para + Windows. + A lista de mudanças é registrada no ChangeLog. +

    +

    + O guia de migração está disponível no Manual do PHP. + Consulte-o para obter uma lista detalhada de novos recursos e alterações incompatíveis com versões anteriores. +

    ', +]; diff --git a/releases/8.0/languages/ru.php b/releases/8.0/languages/ru.php new file mode 100644 index 0000000000..17acb1cd2d --- /dev/null +++ b/releases/8.0/languages/ru.php @@ -0,0 +1,86 @@ + 'PHP 8.0 — большое обновление языка PHP. Оно содержит множество новых возможностей и оптимизаций, включая именованные аргументы, тип union, атрибуты, упрощённое определение свойств в конструкторе, выражение match, оператор nullsafe, JIT и улучшения в системе типов, обработке ошибок и консистентности.', + 'documentation' => 'Документация', + 'main_title' => 'доступен!', + 'main_subtitle' => 'PHP 8.0 — большое обновление языка PHP.
    Оно содержит множество новых возможностей и оптимизаций, включая именованные аргументы, union type, атрибуты, упрощённое определение свойств в конструкторе, выражение match, оператор nullsafe, JIT и улучшения в системе типов, обработке ошибок и консистентности.', + 'upgrade_now' => 'Переходите на PHP 8!', + + 'named_arguments_title' => 'Именованные аргументы', + 'named_arguments_description' => '
  • Указывайте только необходимые параметры, пропускайте необязательные.
  • Порядок аргументов не важен, аргументы самодокументируемы.
  • ', + 'attributes_title' => 'Атрибуты', + 'attributes_description' => 'Вместо аннотаций PHPDoc вы можете использовать структурные метаданные с нативным синтаксисом PHP.', + 'constructor_promotion_title' => 'Объявление свойств в конструкторе', + 'constructor_promotion_description' => 'Меньше шаблонного кода для определения и инициализации свойств.', + 'union_types_title' => 'Тип Union', + 'union_types_description' => 'Вместо аннотаций PHPDoc для объединённых типов вы можете использовать объявления типа union, которые проверяются во время выполнения.', + 'ok' => 'Нет ошибки', + 'oh_no' => 'О нет!', + 'this_is_expected' => 'То, что я и ожидал', + 'match_expression_title' => 'Выражение Match', + 'match_expression_description' => '

    Новое выражение match похоже на оператор switch со следующими особенностями:

    + ', + + 'nullsafe_operator_title' => 'Оператор Nullsafe', + 'nullsafe_operator_description' => 'Вместо проверки на null вы можете использовать последовательность вызовов с новым оператором Nullsafe. Когда один из элементов в последовательности возвращает null, выполнение прерывается и вся последовательность возвращает null.', + 'saner_string_number_comparisons_title' => 'Улучшенное сравнение строк и чисел', + 'saner_string_number_comparisons_description' => 'При сравнении с числовой строкой PHP 8 использует сравнение чисел. В противном случае число преобразуется в строку и используется сравнение строк.', + 'consistent_internal_function_type_errors_title' => 'Ошибки согласованности типов для встроенных функций', + 'consistent_internal_function_type_errors_description' => 'Большинство внутренних функций теперь выбрасывают исключение Error, если при проверке параметра возникает ошибка.', + + 'jit_compilation_title' => 'Компиляция Just-In-Time', + 'jit_compilation_description' => 'PHP 8 представляет два механизма JIT-компиляции. Трассировка JIT, наиболее перспективная из них, на синтетических бенчмарках показывает улучшение производительности примерно в 3 раза и в 1,5–2 раза на некоторых долго работающих приложениях. Стандартная производительность приложения находится на одном уровне с PHP 7.4.', + 'jit_performance_title' => 'Относительный вклад JIT в производительность PHP 8', + + 'type_improvements_title' => 'Улучшения в системе типов и обработке ошибок', + 'arithmetic_operator_type_checks' => 'Более строгие проверки типов для арифметических/побитовых операторов', + 'abstract_trait_method_validation' => 'Проверка методов абстрактных трейтов', + 'magic_method_signatures' => 'Правильные сигнатуры магических методов', + 'engine_warnings' => 'Реклассификация предупреждений движка', + 'lsp_errors' => 'Фатальная ошибка при несовместимости сигнатур методов', + 'at_operator_no_longer_silences_fatal_errors' => 'Оператор @ больше не подавляет фатальные ошибки.', + 'inheritance_private_methods' => 'Наследование с private методами', + 'mixed_type' => 'Новый тип mixed', + 'static_return_type' => 'Возвращаемый тип static', + 'internal_function_types' => 'Типы для стандартных функций', + 'email_thread' => 'E-mail Тема', + 'opaque_objects_instead_of_resources' => 'Непрозрачные объекты вместо ресурсов для + Curl, + Gd, + Sockets, + OpenSSL, + XMLWriter, e + XML + расширения', + + 'other_improvements_title' => 'Прочие улучшения синтаксиса', + 'allow_trailing_comma' => 'Разрешена запятая в конце списка параметров RFC + и в списке use замыканий RFC', + 'non_capturing_catches' => 'Блок catch без указания переменной', + 'variable_syntax_tweaks' => 'Изменения синтаксиса переменных', + 'namespaced_names_as_token' => 'Имена в пространстве имен рассматриваются как единый токен', + 'throw_expression' => 'Выражение throw', + 'class_name_literal_on_object' => 'Добавление ::class для объектов', + + 'new_classes_title' => 'Новые классы, интерфейсы и функции', + 'weak_map_class' => 'Класс Weak Map', + 'stringable_interface' => 'Интерфейс Stringable', + 'token_as_object' => 'Объектно-ориентированная функция token_get_all()', + 'new_dom_apis' => 'Новые API для обходения и обработки DOM', + + 'footer_title' => 'Выше производительность, лучше синтаксис, надежнее система типов.', + 'footer_description' => '

    + Для загрузки исходного кода PHP 8 посетите страницу downloads. + Бинарные файлы Windows находятся на сайте PHP для Windows. + Список изменений представлен в ChangeLog. +

    +

    + Руководство по миграции доступно в разделе документации. Пожалуйста, + изучите его для получения подробного списка новых возможностей и обратно несовместимых изменений. +

    ', +]; diff --git a/releases/8.0/languages/tr.php b/releases/8.0/languages/tr.php new file mode 100644 index 0000000000..d6c67e9116 --- /dev/null +++ b/releases/8.0/languages/tr.php @@ -0,0 +1,85 @@ + 'PHP 8.0, PHP dili için önemli bir güncellemedir. Optimizasyonlar ve yeni özellikler: Adlandırılmış Değişkenler, Union Types, Attributes, Kurucularda Özellik Tanımı, Match İfadesi, Nullsafe Operatorü, JIT(Anında Derleme) yanında tip sistemi, hata işleme ve tutarlılıkta iyileştirmeler içerir.', + 'documentation' => 'Doc', + 'main_title' => 'Yayında!', + 'main_subtitle' => 'PHP 8.0, PHP dili için önemli bir güncellemedir.
    Optimizasyonlar ve yeni özellikler: Adlandırılmış Değişkenler, Union Types, Attributes, Kurucularda Özellik Tanımı, Match İfadesi, Nullsafe Operatorü, JIT(Anında Derleme) yanında tip sistemi, hata işleme ve tutarlılıkta iyileştirmeler içerir.', + 'upgrade_now' => "PHP 8'e geçiş yapın!", + + 'named_arguments_title' => 'Adlandırılmış Değişkenler', + 'named_arguments_description' => '
  • Opsiyonel parametreleri atlayabiliyor ve yalnızca zorunlu olanları belirtebiliyorsunuz.
  • Parametrelerin sırası önemli değil ve kendi kendilerini dokümante ediyorlar.
  • ', + 'attributes_title' => 'Attributes', + 'attributes_description' => 'PHPDoc yorum satırları yerine PHP sözdizimi ile yapılandırılmış metadata kullanılabiliyor.', + 'constructor_promotion_title' => 'Kurucularda Özellik Tanımı', + 'constructor_promotion_description' => 'Sınıfların özelliklerini tanımlamak için daha az kodlama yapılabiliyor.', + 'union_types_title' => 'Union types', + 'union_types_description' => 'Değişken türlerinin kombinasyonu için PHPDoc açıklamaları yerine çalışma zamanında doğrulanan birleşim türleri (union types) tanımlamaları kullanılabiliyor.', + 'match_expression_title' => 'Match İfadesi', + 'match_expression_description' => '

    Yeni match ifadesi switch\'e çok benzer ve aşağıdaki özelliklere sahiptir:

    + ', + + 'nullsafe_operator_title' => 'Nullsafe Operatorü', + 'nullsafe_operator_description' => 'Null koşulları için kontroller yazmak yerine yeni Nullsafe operatörüyle çağrı zinciri oluşturabilirsiniz. Oluşturduğunuz zincirdeki herhangi bir parça hatalı değerlendirilirse tüm zincirin işlevi durur ve null olarak değerlendirilir.', + 'saner_string_number_comparisons_title' => 'Daha Akıllı String ve Sayı Karşılaştırmaları', + 'saner_string_number_comparisons_description' => 'Sayısal string karşılaştırılırken PHP 8 sayısal olarak karşılaştırır. Aksi halde sayı bir string\'e çevrilir ve string olarak karşılaştırılır.', + 'consistent_internal_function_type_errors_title' => 'Dahili İşlevler için Tutarlı Hata Türleri', + 'consistent_internal_function_type_errors_description' => 'Artık dahili işlevlere gönderilen parametreler doğrulanamazsa Error exception fırlatıyorlar.', + + 'jit_compilation_title' => 'Just-In-Time Derlemesi (JIT)', + 'jit_compilation_description' => 'PHP 8, iki JIT derleme motoru sunuyor. Tracing JIT, ikisi arasında en yetenekli olanı. Karşılaştırmalarda yaklaşık 3 kat daha iyi performans ve uzun süre işlem yapan bazı uygulamalarda 1,5–2 kat iyileşme gösteriyor. Normal uygulamalarda performansı PHP 7.4 ile aynı.', + 'jit_performance_title' => 'PHP 8 performasına JIT katkısının karşılaştırması', + + 'type_improvements_title' => 'Tip sistemi ve hata işlemede iyileştirmeler', + 'arithmetic_operator_type_checks' => 'Aritmetik/bitsel operatörler için daha katı tip denetimi', + 'abstract_trait_method_validation' => 'Soyut özellikli metodlar için doğrulama', + 'magic_method_signatures' => 'Sihirli metodlar için doğru işaretlemeler', + 'engine_warnings' => 'Yeniden sınıflandırılan motor hataları', + 'lsp_errors' => 'Uyumsuz metod işaretleri için fatal error', + 'at_operator_no_longer_silences_fatal_errors' => '@ operatörü artık önemli hataları susturmuyor', + 'inheritance_private_methods' => 'Private methodlarda kalıtımlar', + 'mixed_type' => 'mixed tipi', + 'static_return_type' => 'static return tipi', + 'internal_function_types' => 'Dahili işlevler için tip açıklamaları', + 'email_thread' => 'E-posta konusu', + 'opaque_objects_instead_of_resources' => 'Eklentiler için özkaynak türleri(resources) yerine opak nesneler: + Curl, + Gd, + Sockets, + OpenSSL, + XMLWriter ve + XML.', + + 'other_improvements_title' => 'Diğer PHP sözdizimi düzenlemeleri ve iyileştirmeleri', + 'allow_trailing_comma' => 'Parametre ve closure listelerinin sonunda virgül kullanılabilmesi RFC + RFC', + 'non_capturing_catches' => 'Değişken atamasına gerek olmayan hataların yakalanabilmesi', + 'variable_syntax_tweaks' => 'Değişken sözdizimlerinde iyileştirmeler', + 'namespaced_names_as_token' => 'İsim alanındaki tanımları tek bir belirteç olarak değerlendirme', + 'throw_expression' => 'throw deyimi artık bir ifade (expression)', + 'class_name_literal_on_object' => 'Nesnelerde ::class kullanılabilmesi', + + 'new_classes_title' => 'Yeni Sınıflar, Arayüzler ve Fonksiyonlar', + 'weak_map_class' => 'Weak Map sınıfı', + 'stringable_interface' => 'Stringable arayüzü', + 'new_str_functions' => 'str_contains(), + str_starts_with(), + str_ends_with() fonksiyonları', + 'token_as_object' => 'token_get_all() nesne implementasyonu', + 'new_dom_apis' => 'New DOM Traversal and Manipulation APIs', + + 'footer_title' => 'Daha iyi performans, daha iyi sözdizimi, geliştirilmiş tip desteği.', + 'footer_description' => '

    + PHP 8\'i indirmek için downloads sayfasını ziyaret edebilirsiniz. + Windows için derlenmiş sürümüne PHP for Windows sayfasından ulaşabilirsiniz. + Değişiklikler için ChangeLog\'a göz atabilirsiniz. +

    +

    + PHP Kılavuzundan PHP 8 için Göç Belgelerine ulaşabilirsiniz. + Yeni özellikler ve geriye dönük uyumluluğu etkileyecek değişikliklerin ayrıntılı listesi için göç belgesini inceleyiniz. +

    ', +]; diff --git a/releases/8.0/languages/zh.php b/releases/8.0/languages/zh.php new file mode 100644 index 0000000000..9fa1a8aa7d --- /dev/null +++ b/releases/8.0/languages/zh.php @@ -0,0 +1,86 @@ + 'PHP 8.0 是 PHP 语言的一次重大更新。它包含了很多新功能与优化项,包括命名参数、联合类型、注解、构造器属性提升、match 表达式、Nullsafe 运算符、JIT,并改进了类型系统、错误处理、语法一致性。', + 'documentation' => '文档', + 'main_title' => '已发布!', + 'main_subtitle' => 'PHP 8.0 是 PHP 语言的一次重大更新。
    它包含了很多新功能与优化项,包括命名参数、联合类型、注解、构造器属性提升、match 表达式、nullsafe 运算符、JIT,并改进了类型系统、错误处理、语法一致性。', + 'upgrade_now' => '更新到 PHP 8!', + + 'named_arguments_title' => '命名参数', + 'named_arguments_description' => '
  • 仅仅指定必填参数,跳过可选参数。
  • 参数的顺序无关、自己就是文档(self-documented)
  • ', + 'attributes_title' => '注解', + 'attributes_description' => '现在可以用 PHP 原生语法来使用结构化的元数据,而非 PHPDoc 声明。', + 'constructor_promotion_title' => '构造器属性提升', + 'constructor_promotion_description' => '更少的样板代码来定义并初始化属性。', + 'union_types_title' => '联合类型', + 'union_types_description' => '相较于以前的 PHPDoc 声明类型的组合, 现在可以用原生支持的联合类型声明取而代之,并在运行时得到校验。', + 'match_expression_title' => 'Match 表达式', + 'match_expression_description' => '

    新的 match 类似于 switch,并具有以下功能:

    + ', + + 'nullsafe_operator_title' => 'Nullsafe 运算符', + 'nullsafe_operator_description' => '现在可以用新的 nullsafe 运算符链式调用,而不需要条件检查 null。 如果链条中的一个元素失败了,整个链条会中止并认定为 Null。', + 'saner_string_number_comparisons_title' => '字符串与数字的比较更符合逻辑', + 'saner_string_number_comparisons_description' => 'PHP 8 比较数字字符串(numeric string)时,会按数字进行比较。不是数字字符串时,将数字转化为字符串,按字符串比较。', + 'consistent_internal_function_type_errors_title' => '内部函数类型错误的一致性。', + 'consistent_internal_function_type_errors_description' => '现在大多数内部函数在参数验证失败时抛出 Error 级异常。', + + 'jit_compilation_title' => '即时编译', + 'jit_compilation_description' => 'PHP 8 引入了两个即时编译引擎。 Tracing JIT 在两个中更有潜力,它在综合基准测试中显示了三倍的性能,并在某些长时间运行的程序中显示了 1.5-2 倍的性能改进。典型的应用性能则和 PHP 7.4 不相上下。', + 'jit_performance_title' => '关于 JIT 对 PHP 8 性能的贡献', + + 'type_improvements_title' => '类型系统与错误处理的改进', + 'arithmetic_operator_type_checks' => '算术/位运算符更严格的类型检测', + 'abstract_trait_method_validation' => 'Abstract trait 方法的验证', + 'magic_method_signatures' => '确保魔术方法签名正确', + 'engine_warnings' => 'PHP 引擎 warning 警告的重新分类', + 'lsp_errors' => '不兼容的方法签名导致 Fatal 错误', + 'at_operator_no_longer_silences_fatal_errors' => '操作符 @ 不再抑制 fatal 错误。', + 'inheritance_private_methods' => '私有方法继承', + 'mixed_type' => 'mixed 类型', + 'static_return_type' => 'static 返回类型', + 'internal_function_types' => '内部函数的类型', + 'email_thread' => 'Email thread', + 'opaque_objects_instead_of_resources' => '扩展 + Curl、 + Gd、 + Sockets、 + OpenSSL、 + XMLWriter、 + XML + 以 Opaque 对象替换 resource。', + + 'other_improvements_title' => '其他语法调整和改进', + 'allow_trailing_comma' => '允许参数列表中的末尾逗号 RFC、 + 闭包 use 列表中的末尾逗号 RFC', + 'non_capturing_catches' => '无变量捕获的 catch', + 'variable_syntax_tweaks' => '变量语法的调整', + 'namespaced_names_as_token' => 'Namespace 名称作为单个 token', + 'throw_expression' => '现在 throw 是一个表达式', + 'class_name_literal_on_object' => '允许对象的 ::class', + + 'new_classes_title' => '新的类、接口、函数', + 'weak_map_class' => 'Weak Map 类', + 'stringable_interface' => 'Stringable 接口', + 'new_str_functions' => 'str_contains()、 + str_starts_with()、 + str_ends_with()', + 'token_as_object' => 'token_get_all() 对象实现', + 'new_dom_apis' => 'New DOM Traversal and Manipulation APIs', + + 'footer_title' => '性能更好,语法更好,类型安全更完善', + 'footer_description' => '

    + 请访问 下载 页面下载 PHP 8 源代码。 + 在 PHP for Windows 站点中可找到 Windows 二进制文件。 + ChangeLog 中有变更历史记录清单。 +

    +

    + PHP 手册中有 迁移指南。 + 请参考它描述的新功能详细清单、向后不兼容的变化。 +

    ', +]; diff --git a/releases/8.0/nl.php b/releases/8.0/nl.php index e4d2177f18..1a972eecb8 100644 --- a/releases/8.0/nl.php +++ b/releases/8.0/nl.php @@ -1,506 +1,6 @@ -
    -
    -
    - -
    -
    -
    - -
    Beschikbaar!
    -
    - PHP 8.0 is een omvangrijke update van de PHP programmeertaal.
    Het bevat - veel nieuwe mogelijkheden en optimalisaties, waaronder argument naamgeving, unie types, attributen, - promotie van constructor eigenschappen, expressie vergelijking, null-veilige operator, JIT, en - verbeteringen aan het type systeem, foute afhandeling, en consistentie. -
    - -
    -
    - -
    -
    -

    - Argument naamgeving - RFC - Doc -

    -
    -
    -
    PHP 7
    -
    - -
    - - -
    -
    -
    -
    PHP 8
    -
    - -
    -
    -
    -
    -
      -
    • Geef enkel vereiste parameters op, sla optionele parameters over.
    • -
    • Argumenten hebben een onafhankelijke volgorde en documenteren zichzelf.
    • -
    -
    -
    - -
    -

    - Attributen - RFC Doc -

    -
    -
    -
    PHP 7
    -
    - -
    -
    -
    -
    -
    PHP 8
    -
    - -
    -
    -
    -
    -

    In plaats van met PHPDoc annotaties kan je nu gestructureerde metadata gebruiken in PHP's eigen syntaxis.

    -
    -
    - -
    -

    - Promotie van constructor eigenschappen - RFC Doc -

    -
    -
    -
    PHP 7
    -
    - x = $x; - $this->y = $y; - $this->z = $z; - } -}', - );?> -
    -
    -
    -
    -
    PHP 8
    -
    - -
    -
    -
    -
    -

    Minder standaardcode nodig om eigenschappen te definiëren en initialiseren.

    -
    -
    - -
    -

    - Unie types - RFC Doc -

    -
    -
    -
    PHP 7
    -
    - number = $number; - } -} - -new Number(\'NaN\'); // Ok', - );?> -
    -
    -
    -
    -
    PHP 8
    -
    - -
    -
    -
    -
    -

    In plaats van met PHPDoc annotaties kan je de mogelijke types via unie types declareren zodat - deze ook gevalideerd worden tijdens de runtime.

    -
    -
    - -
    -

    - Expressie vergelijking - RFC Doc -

    -
    -
    -
    PHP 7
    -
    - Oh no!', - );?> -
    -
    -
    -
    -
    PHP 8
    -
    - "Oh no!", - 8.0 => "This is what I expected", -}; -//> This is what I expected', - );?> -
    -
    -
    -
    -

    De nieuwe match is gelijkaardig aan switch en heeft volgende eigenschappen:

    -
      -
    • Match is een expressie, dit wil zeggen dat je het in een variabele kan bewaren of teruggeven.
    • -
    • Match aftakkingen zijn expressies van één enkele lijn en bevatten geen break statements.
    • -
    • Match vergelijkingen zijn strikt.
    • -
    -
    -
    - -
    -

    - Null-veilige operator - RFC -

    -
    -
    -
    PHP 7
    -
    - user; - - if ($user !== null) { - $address = $user->getAddress(); - - if ($address !== null) { - $country = $address->country; - } - } -}', - );?> -
    -
    -
    -
    -
    PHP 8
    -
    - user?->getAddress()?->country;', - );?> -
    -
    -
    -
    -

    In plaats van een controle op null uit te voeren kan je nu een ketting van oproepen vormen met de null-veilige operator. - Wanneer één expressie in de ketting faalt, zal de rest van de ketting niet uitgevoerd worden en is het resultaat van - de hele ketting null.

    -
    -
    - -
    -

    - Verstandigere tekst met nummer vergelijkingen - RFC -

    -
    -
    -
    PHP 7
    -
    - -
    -
    -
    -
    -
    PHP 8
    -
    - -
    -
    -
    -
    -

    Wanneer PHP 8 een vergelijking uitvoert tegen een numerieke tekst zal er een numerieke vergelijking uitgevoerd - worden. Anders zal het nummer naar een tekst omgevormd worden en er een tekstuele vergelijking uitgevoerd worden.

    -
    -
    - -
    -

    - Consistente type fouten voor interne functies - RFC -

    -
    -
    -
    PHP 7
    -
    - -
    -
    -
    -
    -
    PHP 8
    -
    - -
    -
    -
    -
    -

    De meeste interne functies gooien nu een Error exception als de validatie van parameters faalt.

    -
    -
    -
    - -
    -

    Just-In-Time compilatie

    -

    - PHP 8 introduceert twee systemen voor JIT compilatie. De tracerende JIT is veelbelovend en presteert ongeveer 3 keer beter - bij synthetische metingen en kan sommige langlopende applicaties 1.5–2 keer verbeteren. Prestaties van typische web applicaties - ligt in lijn met PHP 7.4. -

    -

    - Relatieve JIT bijdrage aan de prestaties van PHP 8 -

    -

    - Just-In-Time compilatie -

    - -
    -
    -

    Type systeem en verbeteringen van de fout afhandeling

    -
      -
    • - Strikte type controles bij rekenkundige/bitsgewijze operatoren - RFC -
    • -
    • - Validatie voor abstracte trait methodes RFC -
    • -
    • - Correcte signatures bij magic methods RFC -
    • -
    • - Herindeling van de engine warnings RFC -
    • -
    • - Fatal error bij incompatibele method signatures RFC -
    • -
    • - De @ operator werkt niet meer bij het onderdrukken van fatale fouten. -
    • -
    • - Overerving bij private methods RFC -
    • -
    • - Mixed type RFC -
    • -
    • - Static return type RFC -
    • -
    • - Types voor interne functies - Email draadje -
    • -
    • - Opaque objects in plaats van resources voor - Curl, - Gd, - Sockets, - OpenSSL, - XMLWriter, and - XML - extensies -
    • -
    -
    -
    -

    Andere syntaxis aanpassingen en verbeteringen

    -
      -
    • - Sta toe om een komma te plaatsen bij het laatste parameter in een lijst RFC - en bij de use in closures RFC -
    • -
    • - Catches die niets vangen RFC -
    • -
    • - Variabele Syntaxis Aanpassingen RFC -
    • -
    • - Namespaced namen worden als één enkel token afgehandeld RFC -
    • -
    • - Throw is nu een expressie RFC -
    • -
    • - ::class werkt bij objecten RFC -
    • -
    - -

    Nieuwe Classes, Interfaces, en Functies

    - -
    -
    -
    - - - - - - - -
    -
    -
    - -
    -
    -
    - -
    Released!
    -
    - PHP 8.0 é uma atualização importante da linguagem PHP.
    Ela contém muitos novos - recursos e otimizações, incluindo argumentos nomeados, união de tipos, atributos, promoção de propriedade do - construtor, expressão match, operador nullsafe, JIT e melhorias no sistema de tipos, tratamento de - erros e consistência. -
    - -
    -
    - -
    -
    -

    - Argumentos nomeados - RFC - Doc -

    -
    -
    -
    PHP 7
    -
    - -
    -
    -
    -
    -
    PHP 8
    -
    - -
    -
    -
    -
    -
      -
    • Especifique apenas os parâmetros obrigatórios, pulando os opcionais.
    • -
    • Os argumentos são independentes da ordem e autodocumentados.
    • -
    -
    -
    - -
    -

    - Atributos - RFC Doc -

    -
    -
    -
    PHP 7
    -
    - -
    -
    -
    -
    -
    PHP 8
    -
    - -
    -
    -
    -
    -

    Em vez de anotações PHPDoc, agora você pode usar metadados estruturados com a sintaxe nativa do PHP.

    -
    -
    - -
    -

    - Promoção de propriedade de construtor - RFC Doc -

    -
    -
    -
    PHP 7
    -
    - x = $x; - $this->y = $y; - $this->z = $z; - } -}', - );?> -
    -
    -
    -
    -
    PHP 8
    -
    - -
    -
    -
    -
    -

    Menos código boilerplate para definir e inicializar propriedades.

    -
    -
    - -
    -

    - União de tipos - RFC Doc -

    -
    -
    -
    PHP 7
    -
    - number = $number; - } -} - -new Number(\'NaN\'); // Ok', - );?> -
    -
    -
    -
    -
    PHP 8
    -
    - -
    -
    -
    -
    -

    Em vez de anotações PHPDoc para uma combinação de tipos, você pode usar declarações de união de tipos nativa - que são validados em tempo de execução.

    -
    -
    - -
    -

    - Expressão match - RFC Doc -

    -
    -
    -
    PHP 7
    -
    - Oh no!', - );?> -
    -
    -
    -
    -
    PHP 8
    -
    - "Oh no!", - 8.0 => "This is what I expected", -}; -//> This is what I expected', - );?> -
    -
    -
    -
    -

    A nova expressão match é semelhante ao switch e tem os seguintes recursos:

    -
      -
    • Match é uma expressão, o que significa que seu resultado pode ser armazenado em uma variável ou - retornado.
    • -
    • Match suporta apenas expressões de uma linha e não precisa de uma declaração break;.
    • -
    • Match faz comparações estritas.
    • -
    -
    -
    - -
    -

    - Operador nullsafe - RFC -

    -
    -
    -
    PHP 7
    -
    - user; - - if ($user !== null) { - $address = $user->getAddress(); - - if ($address !== null) { - $country = $address->country; - } - } -}', - );?> -
    -
    -
    -
    -
    PHP 8
    -
    - user?->getAddress()?->country;', - );?> -
    -
    -
    -
    -

    Em vez de verificar condições nulas, agora você pode usar uma cadeia de chamadas com o novo operador nullsafe. - Quando a avaliação de um elemento da cadeia falha, a execução de toda a cadeia é abortada e toda a cadeia é - avaliada como nula.

    -
    -
    - -
    -

    - Comparações mais inteligentes entre strings e números - RFC -

    -
    -
    -
    PHP 7
    -
    - -
    -
    -
    -
    -
    PHP 8
    -
    - -
    -
    -
    -
    -

    Ao comparar com uma string numérica, o PHP 8 usa uma comparação numérica. Caso contrário, ele converte o - número em uma string e usa uma comparação de string.

    -
    -
    - -
    -

    - Erros consistentes para tipos de dados em funções internas - RFC -

    -
    -
    -
    PHP 7
    -
    - -
    -
    -
    -
    -
    PHP 8
    -
    - -
    -
    -
    -
    -

    A maioria das funções internas agora lançam uma exceção Error se a validação do parâmetro falhar.

    -
    -
    -
    - -
    -

    Compilação Just-In-Time

    -

    - PHP 8 apresenta dois motores de compilação JIT. Tracing JIT, o mais promissor dos dois, mostra desempenho cerca de - 3 vezes melhor em benchmarks sintéticos e melhoria de 1,5 a 2 vezes em alguns aplicativos específicos de longa - execução. O desempenho típico das aplicações está no mesmo nível do PHP 7.4. -

    -

    - Relative JIT contribution to PHP 8 performance -

    -

    - Just-In-Time compilation -

    - -
    -
    -

    Melhorias no sistema de tipo e tratamento de erros

    -
      -
    • - Verificações de tipo mais rígidas para operadores aritméticos / bit a bit - RFC -
    • -
    • - Validação de método abstrato em traits - RFC -
    • -
    • - Assinaturas corretas de métodos mágicos RFC -
    • -
    • - Avisos de motor reclassificados RFC -
    • -
    • - Erro fatal para assinaturas de método incompatíveis RFC -
    • -
    • - O operador @ não silencia mais os erros fatais. -
    • -
    • - Herança com métodos privados RFC -
    • -
    • - Tipo mixed RFC -
    • -
    • - Tipo de retorno static RFC -
    • -
    • - Tipagem de funções internas - Discussão por email -
    • -
    • - Objetos opacos em vez de recursos para - Curl, - Gd, - Sockets, - OpenSSL, - XMLWriter, e - XML - extensões -
    • -
    -
    -
    -

    Outros ajustes e melhorias de sintaxe

    -
      -
    • - Permitir vírgula no final da lista de parâmetros - RFC e listas de uso em closures - RFC -
    • -
    • - Catches sem variável na captura de exceção RFC -
    • -
    • - Ajustes de sintaxe para variáveis RFC -
    • -
    • - Tratamento de nomes de namespace como token único - RFC -
    • -
    • - Throw como expressão RFC -
    • -
    • - Permitir ::class em objetos RFC -
    • -
    - -

    Novas classes, interfaces e funções

    - -
    -
    -
    - - - - - - - +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +

    + + RFC + +

    +
    +
    +
    PHP 7
    +
    + +
    +
    +
    +
    +
    PHP 8
    +
    + +
    +
    +
    +
    +
      + +
    +
    +
    + +
    +

    + + RFC + +

    +
    +
    +
    PHP 7
    +
    + +
    +
    +
    +
    +
    PHP 8
    +
    + +
    +
    +
    +
    +

    +
    +
    + +
    +

    + + RFC + +

    +
    +
    +
    PHP 7
    +
    + x = $x; + $this->y = $y; + $this->z = $z; + } + } + PHP + );?> +
    +
    +
    +
    +
    PHP 8
    +
    + +
    +
    +
    +
    +

    +
    +
    + +
    +

    + + RFC + +

    +
    +
    +
    PHP 7
    +
    + number = $number; + } + } + + new Number('NaN'); // + PHP + . ' ' . message('ok', $lang), + );?> +
    +
    +
    +
    +
    PHP 8
    +
    + +
    +
    +
    +
    +

    +
    +
    + +
    +

    + + RFC + +

    +
    +
    +
    PHP 7
    +
    + {$ohNoText} + PHP + );?> +
    +
    +
    +
    +
    PHP 8
    +
    + "{$ohNoText}", + 8.0 => "{$expectedText}", + }; + //> {$expectedText} + PHP + );?> +
    +
    +
    +
    + +
    +
    + +
    +

    + + RFC +

    +
    +
    +
    PHP 7
    +
    + user; + + if ($user !== null) { + $address = $user->getAddress(); + + if ($address !== null) { + $country = $address->country; + } + } + } + PHP + );?> +
    +
    +
    +
    +
    PHP 8
    +
    + user?->getAddress()?->country; + PHP + );?> +
    +
    +
    +
    +

    +
    +
    + +
    +

    + + RFC +

    +
    +
    +
    PHP 7
    +
    + +
    +
    +
    +
    +
    PHP 8
    +
    + +
    +
    +
    +
    +

    +
    +
    + +
    +

    + + RFC +

    +
    +
    +
    PHP 7
    +
    + +
    +
    +
    +
    +
    PHP 8
    +
    + +
    +
    +
    +
    +

    +
    +
    +
    + +
    +

    +

    +

    +
    + Just-In-Time compilation +
    + +
    +
    +

    +
    + +
    +
    + +
    +

    +
    + +
    + +

    +
    + +
    +
    +
    +
    + + + + -
    -
    -
    - -
    -
    -
    - -
    доступен!
    -
    - PHP 8.0 — большое обновление языка PHP.
    Оно содержит множество новых возможностей и - оптимизаций, включая именованные аргументы, union type, атрибуты, упрощённое определение свойств в конструкторе, выражение match, - оператор nullsafe, JIT и улучшения в системе типов, обработке ошибок и консистентности. -
    - -
    -
    - -
    -
    -

    - Именованные аргументы - RFC - Документация -

    -
    -
    -
    PHP 7
    -
    - -
    -
    -
    -
    -
    PHP 8
    -
    - -
    -
    -
    -
    -
      -
    • Указывайте только необходимые параметры, пропускайте необязательные.
    • -
    • Порядок аргументов не важен, аргументы самодокументируемы.
    • -
    -
    -
    - -
    -

    - Атрибуты - RFC Документация -

    -
    -
    -
    PHP 7
    -
    - -
    -
    -
    -
    -
    PHP 8
    -
    - -
    -
    -
    -
    -

    Вместо аннотаций PHPDoc вы можете использовать структурные метаданные с нативным синтаксисом PHP.

    -
    -
    - -
    -

    - Объявление свойств в конструкторе - RFC Документация -

    -
    -
    -
    PHP 7
    -
    - x = $x; - $this->y = $y; - $this->z = $z; - } -}', - );?> -
    -
    -
    -
    -
    PHP 8
    -
    - -
    -
    -
    -
    -

    Меньше шаблонного кода для определения и инициализации свойств.

    -
    -
    - -
    -

    - Тип Union - RFC Документация -

    -
    -
    -
    PHP 7
    -
    - number = $number; - } -} - -new Number(\'NaN\'); // Нет ошибки', - );?> -
    -
    -
    -
    -
    PHP 8
    -
    - -
    -
    -
    -
    -

    Вместо аннотаций PHPDoc для объединённых типов вы можете использовать объявления типа union, которые - проверяются во время выполнения.

    -
    -
    - -
    -

    - Выражение Match - RFC Документация -

    -
    -
    -
    PHP 7
    -
    - О нет!', - );?> -
    -
    -
    -
    -
    PHP 8
    -
    - "О нет!", - 8.0 => "То, что я и ожидал", -}; -//> То, что я и ожидал', - );?> -
    -
    -
    -
    -

    Новое выражение match похоже на оператор switch со следующими особенностями:

    -
      -
    • Match — это выражение, его результат может быть сохранён в переменной или возвращён.
    • -
    • Условия match поддерживают только однострочные выражения, для которых не требуется управляющая конструкция break;.
    • -
    • Выражение match использует строгое сравнение.
    • -
    -
    -
    - -
    -

    - Оператор Nullsafe - RFC -

    -
    -
    -
    PHP 7
    -
    - user; - - if ($user !== null) { - $address = $user->getAddress(); - - if ($address !== null) { - $country = $address->country; - } - } -}', - );?> -
    -
    -
    -
    -
    PHP 8
    -
    - user?->getAddress()?->country;', - );?> -
    -
    -
    -
    -

    Вместо проверки на null вы можете использовать последовательность вызовов с новым оператором Nullsafe. Когда - один из элементов в последовательности возвращает null, выполнение прерывается и вся последовательность - возвращает null.

    -
    -
    - -
    -

    - Улучшенное сравнение строк и чисел - RFC -

    -
    -
    -
    PHP 7
    -
    - -
    -
    -
    -
    -
    PHP 8
    -
    - -
    -
    -
    -
    -

    При сравнении с числовой строкой PHP 8 использует сравнение чисел. В противном случае число преобразуется в - строку и используется сравнение строк.

    -
    -
    - -
    -

    - Ошибки согласованности типов для встроенных функций - RFC -

    -
    -
    -
    PHP 7
    -
    - -
    -
    -
    -
    -
    PHP 8
    -
    - -
    -
    -
    -
    -

    Большинство внутренних функций теперь выбрасывают исключение Error, если при проверке параметра возникает ошибка.

    -
    -
    -
    - -
    -

    Компиляция Just-In-Time

    -

    - PHP 8 представляет два механизма JIT-компиляции. Трассировка JIT, наиболее перспективная из них, на синтетических бенчмарках показывает - улучшение производительности примерно в 3 раза и в 1,5–2 раза на некоторых долго работающих приложениях. Стандартная - производительность приложения находится на одном уровне с PHP 7.4. -

    -

    - Относительный вклад JIT в производительность PHP 8 -

    -

    - Компиляция Just-In-Time -

    - -
    -
    -

    Улучшения в системе типов и обработке ошибок

    -
      -
    • - Более строгие проверки типов для арифметических/побитовых операторов - RFC -
    • -
    • - Проверка методов абстрактных трейтов RFC -
    • -
    • - Правильные сигнатуры магических методов RFC -
    • -
    • - Реклассификация предупреждений движка RFC -
    • -
    • - Фатальная ошибка при несовместимости сигнатур методов RFC -
    • -
    • - Оператор @ больше не подавляет фатальные ошибки. -
    • -
    • - Наследование с private методами RFC -
    • -
    • - Новый тип mixed RFC -
    • -
    • - Возвращаемый тип static RFC -
    • -
    • - Типы для стандартных функций - E-mail Тема -
    • -
    • - Непрозрачные объекты вместо ресурсов для - Curl, - Gd, - Sockets, - OpenSSL, - XMLWriter, e - XML - расширения -
    • -
    -
    -
    -

    Прочие улучшения синтаксиса

    -
      -
    • - Разрешена запятая в конце списка параметров RFC - и в списке use замыканий RFC -
    • -
    • - Блок catch без указания переменной RFC -
    • -
    • - Изменения синтаксиса переменных RFC -
    • -
    • - Имена в пространстве имен рассматриваются как единый токен RFC -
    • -
    • - Выражение Throw RFC -
    • -
    • - Добавление ::class для объектов RFC -
    • -
    - -

    Новые классы, интерфейсы и функции

    - -
    -
    -
    - - - - - - - -
    -
    -
    - -
    -
    -
    - -
    Yayında!
    -
    - PHP 8.0, PHP dili için önemli bir güncellemedir.
    Optimizasyonlar ve yeni özellikler: - Adlandırılmış Değişkenler, Union Types, Attributes, Kurucularda Özellik Tanımı, Match İfadesi, Nullsafe - Operatorü, JIT(Anında Derleme) yanında tip sistemi, hata işleme ve tutarlılıkta iyileştirmeler içerir. -
    - -
    -
    - -
    -
    -

    - Adlandırılmış Değişkenler - RFC - Doc -

    -
    -
    -
    PHP 7
    -
    - -
    - - -
    -
    -
    -
    PHP 8
    -
    - -
    -
    -
    -
    -
      -
    • Opsiyonel parametreleri atlayabiliyor ve yalnızca zorunlu olanları belirtebiliyorsunuz.
    • -
    • Parametrelerin sırası önemli değil ve kendi kendilerini dokümante ediyorlar.
    • -
    -
    -
    - -
    -

    - Attributes - RFC Doc -

    -
    -
    -
    PHP 7
    -
    - -
    -
    -
    -
    -
    PHP 8
    -
    - -
    -
    -
    -
    -

    PHPDoc yorum satırları yerine PHP sözdizimi ile yapılandırılmış metadata kullanılabiliyor.

    -
    -
    - -
    -

    - Kurucularda Özellik Tanımı - RFC Doc -

    -
    -
    -
    PHP 7
    -
    - x = $x; - $this->y = $y; - $this->z = $z; - } -}', - );?> -
    -
    -
    -
    -
    PHP 8
    -
    - -
    -
    -
    -
    -

    Sınıfların özelliklerini tanımlamak için daha az kodlama yapılabiliyor.

    -
    -
    - -
    -

    - Union types - RFC Doc -

    -
    -
    -
    PHP 7
    -
    - number = $number; - } -} - -new Number(\'NaN\'); // Ok', - );?> -
    -
    -
    -
    -
    PHP 8
    -
    - -
    -
    -
    -
    -

    Değişken türlerinin kombinasyonu için PHPDoc açıklamaları yerine çalışma zamanında doğrulanan - birleşim türleri (union types) tanımlamaları kullanılabiliyor.

    -
    -
    - -
    -

    - Match İfadesi - RFC Doc -

    -
    -
    -
    PHP 7
    -
    - Oh no!', - );?> -
    -
    -
    -
    -
    PHP 8
    -
    - "Oh no!", - 8.0 => "This is what I expected", -}; -//> This is what I expected', - );?> -
    -
    -
    -
    -

    Yeni match ifadesi switch'e çok benzer ve aşağıdaki özelliklere sahiptir:

    -
      -
    • Match bir ifadedir, sonucu bir değişkende saklanabilir veya döndürülebilir.
    • -
    • Match'in karşılıkları tek satır ifadeleri destekler ve break; kullanılması gerekmez.
    • -
    • Match katı (strict) tip karşılaştırma yapar.
    • -
    -
    -
    - -
    -

    - Nullsafe Operatorü - RFC -

    -
    -
    -
    PHP 7
    -
    - user; - - if ($user !== null) { - $address = $user->getAddress(); - - if ($address !== null) { - $country = $address->country; - } - } -}', - );?> -
    -
    -
    -
    -
    PHP 8
    -
    - user?->getAddress()?->country;', - );?> -
    -
    -
    -
    -

    Null koşulları için kontroller yazmak yerine yeni Nullsafe operatörüyle çağrı zinciri - oluşturabilirsiniz. Oluşturduğunuz zincirdeki herhangi bir parça hatalı - değerlendirilirse tüm zincirin işlevi durur ve null olarak değerlendirilir.

    -
    -
    - -
    -

    - Daha Akıllı String ve Sayı Karşılaştırmaları - RFC -

    -
    -
    -
    PHP 7
    -
    - -
    -
    -
    -
    -
    PHP 8
    -
    - -
    -
    -
    -
    -

    Sayısal string karşılaştırılırken PHP 8 sayısal olarak karşılaştırır. Aksi halde sayı bir - string'e çevrilir ve string olarak karşılaştırılır.

    -
    -
    - -
    -

    - Dahili İşlevler için Tutarlı Hata Türleri - RFC -

    -
    -
    -
    PHP 7
    -
    - -
    -
    -
    -
    -
    PHP 8
    -
    - -
    -
    -
    -
    -

    Artık dahili işlevlere gönderilen parametreler doğrulanamazsa Error exception fırlatıyorlar.

    -
    -
    -
    - -
    -

    Just-In-Time Derlemesi (JIT)

    -

    - PHP 8, iki JIT derleme motoru sunuyor. Tracing JIT, ikisi arasında en yetenekli olanı. Karşılaştırmalarda - yaklaşık 3 kat daha iyi performans ve uzun süre işlem yapan bazı uygulamalarda 1,5–2 kat iyileşme gösteriyor. - Normal uygulamalarda performansı PHP 7.4 ile aynı. -

    -

    - PHP 8 performasına JIT katkısının karşılaştırması -

    -

    - Just-In-Time compilation -

    - -
    -
    -

    Tip sistemi ve hata işlemede iyileştirmeler

    -
      -
    • - Aritmetik/bitsel operatörler için daha katı tip denetimi - RFC -
    • -
    • - Soyut özellikli metodlar için doğrulama RFC -
    • -
    • - Sihirli metodlar için doğru işaretlemeler RFC -
    • -
    • - Yeniden sınıflandırılan motor hataları RFC -
    • -
    • - Uyumsuz metod işaretleri için fatal error RFC -
    • -
    • - @ operatörü artık önemli hataları susturmuyor -
    • -
    • - Private methodlarda kalıtımlar RFC -
    • -
    • - Mixed tipi RFC -
    • -
    • - Static return tipi RFC -
    • -
    • - Dahili işlevler için tip açıklamaları - E-posta konusu -
    • -
    • - Eklentiler için özkaynak türleri(resources) yerine opak nesneler: - Curl, - Gd, - Sockets, - OpenSSL, - XMLWriter ve - XML. -
    • -
    -
    -
    -

    Diğer PHP sözdizimi düzenlemeleri ve iyileştirmeleri

    -
      -
    • - Parametre ve closure listelerinin sonunda virgül kullanılabilmesi RFC - RFC -
    • -
    • - Değişken atamasına gerek olmayan hataların yakalanabilmesi RFC -
    • -
    • - Değişken sözdizimlerinde iyileştirmeler RFC -
    • -
    • - İsim alanındaki tanımları tek bir belirteç olarak değerlendirme RFC -
    • -
    • - Throw deyimi artık bir ifade (expression) RFC -
    • -
    • - Nesnelerde ::class kullanılabilmesi RFC -
    • -
    - -

    Yeni Sınıflar, Arayüzler ve Fonksiyonlar

    - -
    -
    -
    - - - - - - - -
    -
    -
    - -
    -
    -
    - -
    已发布!
    -
    - PHP 8.0 是 PHP 语言的一次重大更新。 -
    它包含了很多新功能与优化项, - 包括命名参数、联合类型、注解、构造器属性提升、match 表达式、nullsafe 运算符、JIT,并改进了类型系统、错误处理、语法一致性。 -
    - -
    -
    - -
    -
    -

    - 命名参数 - RFC - Doc -

    -
    -
    -
    PHP 7
    -
    - -
    - - -
    -
    -
    -
    PHP 8
    -
    - -
    -
    -
    -
    -
      -
    • 仅仅指定必填参数,跳过可选参数。
    • -
    • 参数的顺序无关、自己就是文档(self-documented)
    • -
    -
    -
    - -
    -

    - 注解 - RFC Doc -

    -
    -
    -
    PHP 7
    -
    - -
    -
    -
    -
    -
    PHP 8
    -
    - -
    -
    -
    -
    -

    现在可以用 PHP 原生语法来使用结构化的元数据,而非 PHPDoc 声明。

    -
    -
    - -
    -

    - 构造器属性提升 - RFC 文档 -

    -
    -
    -
    PHP 7
    -
    - x = $x; - $this->y = $y; - $this->z = $z; - } -}', - );?> -
    -
    -
    -
    -
    PHP 8
    -
    - -
    -
    -
    -
    -

    更少的样板代码来定义并初始化属性。

    -
    -
    - -
    -

    - 联合类型 - RFC 文档 -

    -
    -
    -
    PHP 7
    -
    - number = $number; - } -} -new Number(\'NaN\'); // Ok', - );?> -
    -
    -
    -
    -
    PHP 8
    -
    - -
    -
    -
    -
    -

    相较于以前的 PHPDoc 声明类型的组合, - 现在可以用原生支持的联合类型声明取而代之,并在运行时得到校验。

    -
    -
    - -
    -

    - Match 表达式 - RFC 文档 -

    -
    -
    -
    PHP 7
    -
    - Oh no!', - );?> -
    -
    -
    -
    -
    PHP 8
    -
    - "Oh no!", - 8.0 => "This is what I expected", -}; -//> This is what I expected', - );?> -
    -
    -
    -
    -

    新的 match 类似于 switch,并具有以下功能:

    -
      -
    • Match 是一个表达式,它可以储存到变量中亦可以直接返回。
    • -
    • Match 分支仅支持单行,它不需要一个 break; 语句。
    • -
    • Match 使用严格比较。
    • -
    -
    -
    - -
    -

    - Nullsafe 运算符 - RFC -

    -
    -
    -
    PHP 7
    -
    - user; - if ($user !== null) { - $address = $user->getAddress(); - - if ($address !== null) { - $country = $address->country; - } - } -}', - );?> -
    -
    -
    -
    -
    PHP 8
    -
    - user?->getAddress()?->country;', - );?> -
    -
    -
    -
    -

    现在可以用新的 nullsafe 运算符链式调用,而不需要条件检查 null。 - 如果链条中的一个元素失败了,整个链条会中止并认定为 Null。

    -
    -
    - -
    -

    - 字符串与数字的比较更符合逻辑 - RFC -

    -
    -
    -
    PHP 7
    -
    - -
    -
    -
    -
    -
    PHP 8
    -
    - -
    -
    -
    -
    -

    PHP 8 比较数字字符串(numeric string)时,会按数字进行比较。 - 不是数字字符串时,将数字转化为字符串,按字符串比较。

    -
    -
    - -
    -

    - 内部函数类型错误的一致性。 - RFC -

    -
    -
    -
    PHP 7
    -
    - -
    -
    -
    -
    -
    PHP 8
    -
    - -
    -
    -
    -
    -

    现在大多数内部函数在参数验证失败时抛出 Error 级异常。

    -
    -
    -
    - -
    -

    即时编译

    -

    - PHP 8 引入了两个即时编译引擎。 - Tracing JIT 在两个中更有潜力,它在综合基准测试中显示了三倍的性能, - 并在某些长时间运行的程序中显示了 1.5-2 倍的性能改进。 - 典型的应用性能则和 PHP 7.4 不相上下。 -

    -

    - 关于 JIT 对 PHP 8 性能的贡献 -

    -

    - Just-In-Time compilation -

    - -
    -
    -

    类型系统与错误处理的改进

    -
      -
    • - 算术/位运算符更严格的类型检测 - RFC -
    • -
    • - Abstract trait 方法的验证 RFC -
    • -
    • - 确保魔术方法签名正确 RFC -
    • -
    • - PHP 引擎 warning 警告的重新分类 RFC -
    • -
    • - 不兼容的方法签名导致 Fatal 错误 RFC -
    • -
    • - 操作符 @ 不再抑制 fatal 错误。 -
    • -
    • - 私有方法继承 RFC -
    • -
    • - Mixed 类型 RFC -
    • -
    • - Static 返回类型 RFC -
    • -
    • - 内部函数的类型 - Email thread -
    • -
    • - 扩展 - Curl、 - Gd、 - Sockets、 - OpenSSL、 - XMLWriter、 - XML - 以 Opaque 对象替换 resource。 -
    • -
    -
    -
    -

    其他语法调整和改进

    -
      -
    • - 允许参数列表中的末尾逗号 RFC、 - 闭包 use 列表中的末尾逗号 RFC -
    • -
    • - 无变量捕获的 catch RFC -
    • -
    • - 变量语法的调整 RFC -
    • -
    • - Namespace 名称作为单个 token RFC -
    • -
    • - 现在 throw 是一个表达式 RFC -
    • -
    • - 允许对象的 ::class RFC -
    • -
    - -

    新的类、接口、函数

    - -
    -
    -
    - - - - - - -

    - RFC + RFC +

    @@ -84,7 +88,8 @@ PHP

    - RFC + RFC +

    @@ -95,15 +100,15 @@ PHP class BlogData { private Status $status; - - public function __construct(Status $status) + + public function __construct(Status $status) { $this->status = $status; } - - public function getStatus(): Status + + public function getStatus(): Status { - return $this->status; + return $this->status; } } PHP @@ -120,8 +125,8 @@ PHP class BlogData { public readonly Status $status; - - public function __construct(Status $status) + + public function __construct(Status $status) { $this->status = $status; } @@ -139,7 +144,8 @@ PHP

    - RFC + RFC +

    @@ -184,10 +190,10 @@ PHP

    - RFC + RFC +

    @@ -317,7 +324,8 @@ PHP

    - RFC + RFC +

    @@ -329,7 +337,7 @@ function redirect(string $uri) { header('Location: ' . $uri); exit(); } - + function redirectToLoginPage() { redirect('/login'); echo 'Hello'; // <- dead code @@ -349,10 +357,10 @@ function redirect(string $uri): never { header('Location: ' . $uri); exit(); } - + function redirectToLoginPage(): never { redirect('/login'); - echo 'Hello'; // <- dead code detected by static analysis + echo 'Hello'; // <- dead code detected by static analysis } PHP @@ -368,7 +376,8 @@ PHP

    - RFC + RFC +

    @@ -419,7 +428,8 @@ PHP

    - RFC + RFC +

    @@ -428,7 +438,7 @@ PHP @@ -441,7 +451,7 @@ PHP
    @@ -455,7 +465,8 @@ PHP

    - RFC + RFC +

    @@ -496,7 +507,8 @@ PHP

    - RFC + RFC +

    diff --git a/tests/Visual/SmokeTest.spec.ts-snapshots/tests-screenshots-releases-8-0-index-php-chromium.png b/tests/Visual/SmokeTest.spec.ts-snapshots/tests-screenshots-releases-8-0-index-php-chromium.png index 2c4a275d5b..3cde37e348 100644 Binary files a/tests/Visual/SmokeTest.spec.ts-snapshots/tests-screenshots-releases-8-0-index-php-chromium.png and b/tests/Visual/SmokeTest.spec.ts-snapshots/tests-screenshots-releases-8-0-index-php-chromium.png differ