Commit: 141b8f1436a0399d917838ee6c1f3846c280a2eb
Author: Roman Pronskiy <[email protected]> Wed, 25 Nov 2020
12:48:58 +0200
Committer: Sara Golemon <[email protected]> Wed, 25 Nov 2020 20:28:13 +0000
Parents: dcad9427fa0e3f941da4f521f8b8f9d3ce0e0650
Branches: master
Link:
http://git.php.net/?p=web/php.git;a=commitdiff;h=141b8f1436a0399d917838ee6c1f3846c280a2eb
Log:
Update Dutch translation markup
Changed paths:
M releases/8_0_x_nl.php
diff --git a/releases/8_0_x_nl.php b/releases/8_0_x_nl.php
index 140821bd0..0a8999d4c 100644
--- a/releases/8_0_x_nl.php
+++ b/releases/8_0_x_nl.php
@@ -2,27 +2,28 @@
$_SERVER['BASE_PAGE'] = 'releases/8_0_x.php';
include_once __DIR__ . '/../include/prepend.inc';
-if ($LANG !== 'en' && file_exists("8_0_x_$LANG.php")) {
- mirror_redirect("/releases/8_0_x_$LANG.php?lang=$LANG");
+if ($LANG === 'en') {
+ mirror_redirect('/releases/8_0_x.php?lang=' . urlencode($LANG));
+}
+
+if (($LANG !== 'nl') && file_exists(__DIR__ . '/8_0_x_' . basename($LANG) .
'.php')) {
+ mirror_redirect('/releases/8_0_x_' . urlencode($LANG) . '.php?lang=' .
urlencode($LANG));
}
site_header("PHP 8.0.0 Release Announcement", array(
- "current" => "php_8_0_x",
+ "current" => "php_8_0_x_nl",
'css' => array('php8.css'),
'meta_tags' => array(
'og:image' => $MYSITE . 'images/php8/php_8_released.png'
)
));
?>
-<section>
- <div class="page-tools">
- <div class="change-language">
- <?php echo release_language_chooser($LANG); ?>
- </div>
- </div>
-</section>
-
<section class="php8-section php8-section_dark php8-section_header center">
+ <div class="page-tools">
+ <div class="change-language">
+ <?php echo release_language_chooser($LANG); ?>
+ </div>
+ </div>
<div class="php8-section__content">
<div class="php8-logo">
<img src="/images/php8/logo_php8.svg" alt="php8" height="126"
width="343">
@@ -35,7 +36,7 @@ site_header("PHP 8.0.0 Release Announcement", array(
en algehele consistentie.
</div>
<div class="php8-button-wrapper center">
- <a class="php8-button php8-button_light" href="#">Upgrade nu naar PHP
8!</a>
+ <a class="php8-button php8-button_light" href="/downloads">Upgrade nu
naar PHP 8!</a>
</div>
</div>
</section>
@@ -50,14 +51,18 @@ site_header("PHP 8.0.0 Release Announcement", array(
<div class="php8-compare__block example-contents">
<div class="php8-compare__label">PHP 7</div>
<div class="php8-code phpcode">
- <pre>htmlspecialchars($string, ENT_COMPAT | ENT_HTML401, 'UTF-8',
false);</pre>
+ <?php highlight_php_trimmed(
+ 'htmlspecialchars($string, ENT_COMPAT | ENT_HTML401,
\'UTF-8\', false);'
+ );?>
</div>
</div>
<div class="php8-compare__arrow"></div>
<div class="php8-compare__block example-contents">
<div class="php8-compare__label php8-compare__label_new">PHP 8</div>
<div class="php8-code phpcode">
- <pre>htmlspecialchars($string, double_encode: false);</pre>
+ <?php highlight_php_trimmed(
+ 'htmlspecialchars($string, double_encode: false);'
+ );?>
</div>
</div>
</div>
@@ -78,20 +83,24 @@ site_header("PHP 8.0.0 Release Announcement", array(
<div class="php8-compare__block example-contents">
<div class="php8-compare__label">PHP 7</div>
<div class="php8-code phpcode">
-<pre>/**
+ <?php highlight_php_trimmed(
+ '/**
* @Route("/api/posts/{id}", methods={"GET", "HEAD"})
*/
-classUser
-{</pre>
+class User
+{'
+ );?>
</div>
</div>
<div class="php8-compare__arrow"></div>
<div class="php8-compare__block example-contents">
<div class="php8-compare__label php8-compare__label_new">PHP 8</div>
<div class="php8-code phpcode">
-<pre>#[Route("/api/posts/{id}", methods: ["GET", "HEAD"])]
+ <?php highlight_php_trimmed(
+ '#[Route("/api/posts/{id}", methods: ["GET", "HEAD"])]
class User
-{</pre>
+{'
+ );?>
</div>
</div>
</div>
@@ -109,34 +118,38 @@ class User
<div class="php8-compare__block example-contents">
<div class="php8-compare__label">PHP 7</div>
<div class="php8-code phpcode">
-<pre>class Point {
- public float $x;
- public float $y;
- public float $z;
+ <?php highlight_php_trimmed(
+ 'class Point {
+ public float $x;
+ public float $y;
+ public float $z;
- public function __construct(
- float $x = 0.0,
- float $y = 0.0,
- float $z = 0.0,
- ) {
- $this->x = $x;
- $this->y = $y;
- $this->z = $z;
- }
-}</pre>
+ public function __construct(
+ float $x = 0.0,
+ float $y = 0.0,
+ float $z = 0.0,
+ ) {
+ $this->x = $x;
+ $this->y = $y;
+ $this->z = $z;
+ }
+}'
+ );?>
</div>
</div>
<div class="php8-compare__arrow"></div>
<div class="php8-compare__block example-contents">
<div class="php8-compare__label php8-compare__label_new">PHP 8</div>
<div class="php8-code phpcode">
-<pre>class Point {
- public function __construct(
- public float $x = 0.0,
- public float $y = 0.0,
- public float $z = 0.0,
- ) {}
-}</pre>
+ <?php highlight_php_trimmed(
+ 'class Point {
+ public function __construct(
+ public float $x = 0.0,
+ public float $y = 0.0,
+ public float $z = 0.0,
+ ) {}
+}'
+ );?>
</div>
</div>
</div>
@@ -148,38 +161,42 @@ class User
<div class="php8-compare">
<h2 class="php8-h2" id="union-types">
Union types
- <a class="php8-rfc"
href="https://wiki.php.net/rfc/union_types_v2">RFC</a>
+ <a class="php8-rfc"
href="https://wiki.php.net/rfc/union_types_v2">RFC</a> <a class="php8-rfc"
href="/manual/en/language.types.declarations.php#language.types.declarations.union">Doc</a>
</h2>
<div class="php8-compare__main">
<div class="php8-compare__block example-contents">
<div class="php8-compare__label">PHP 7</div>
<div class="php8-code phpcode">
-<pre>class Number {
- /** @var int|float */
- private $number;
+ <?php highlight_php_trimmed(
+ 'class Number {
+ /** @var int|float */
+ private $number;
- /**
- * @param float|int $number
- */
- public function __construct($number) {
- $this->number = $number;
- }
+ /**
+ * @param float|int $number
+ */
+ public function __construct($number) {
+ $this->number = $number;
+ }
}
-new Number('NaN'); // Ok</pre>
+new Number(\'NaN\'); // Ok'
+ );?>
</div>
</div>
<div class="php8-compare__arrow"></div>
<div class="php8-compare__block example-contents">
<div class="php8-compare__label php8-compare__label_new">PHP 8</div>
<div class="php8-code phpcode">
-<pre>class Number {
- public function __construct(
- private int|float $number
- ) {}
+ <?php highlight_php_trimmed(
+ 'class Number {
+ public function __construct(
+ private int|float $number
+ ) {}
}
-new Number('NaN'); // TypeError</pre>
+new Number(\'NaN\'); // TypeError'
+ );?>
</div>
</div>
</div>
@@ -198,27 +215,31 @@ new Number('NaN'); // TypeError</pre>
<div class="php8-compare__block example-contents">
<div class="php8-compare__label">PHP 7</div>
<div class="php8-code phpcode">
-<pre>switch (8.0) {
- case '8.0':
- $result = "Oh no!";
- break;
- case 8.0:
- $result = "This is what I expected";
- break;
+ <?php highlight_php_trimmed(
+ 'switch (8.0) {
+ case \'8.0\':
+ $result = "Oh no!";
+ break;
+ case 8.0:
+ $result = "This is what I expected";
+ break;
}
echo $result;
-//> Oh no!</pre>
+//> Oh no!'
+ );?>
</div>
</div>
<div class="php8-compare__arrow"></div>
<div class="php8-compare__block example-contents">
<div class="php8-compare__label php8-compare__label_new">PHP 8</div>
<div class="php8-code phpcode">
-<pre>echo match (8.0) {
- '8.0' => "Oh no!",
- 8.0 => "This is what I expected",
+ <?php highlight_php_trimmed(
+ 'echo match (8.0) {
+ \'8.0\' => "Oh no!",
+ 8.0 => "This is what I expected",
};
-//> This is what I expected</pre>
+//> This is what I expected'
+ );?>
</div>
</div>
</div>
@@ -241,26 +262,30 @@ echo $result;
<div class="php8-compare__block example-contents">
<div class="php8-compare__label">PHP 7</div>
<div class="php8-code phpcode">
-<pre>$country = null;
+ <?php highlight_php_trimmed(
+ '$country = null;
if ($session !== null) {
- $user = $session->user;
+ $user = $session->user;
- if ($user !== null) {
- $address = $user->getAddress();
-
- if ($address !== null) {
- $country = $address->country;
- }
- }
-}</pre>
+ if ($user !== null) {
+ $address = $user->getAddress();
+
+ if ($address !== null) {
+ $country = $address->country;
+ }
+ }
+}'
+ );?>
</div>
</div>
<div class="php8-compare__arrow"></div>
<div class="php8-compare__block example-contents">
<div class="php8-compare__label php8-compare__label_new">PHP 8</div>
<div class="php8-code phpcode">
- <pre>$country = $session?->user?->getAddress()?->country;</pre>
+ <?php highlight_php_trimmed(
+ '$country = $session?->user?->getAddress()?->country;'
+ );?>
</div>
</div>
</div>
@@ -279,14 +304,18 @@ if ($session !== null) {
<div class="php8-compare__block example-contents">
<div class="php8-compare__label">PHP 7</div>
<div class="php8-code phpcode">
- <pre>0 == 'foobar' // true</pre>
+ <?php highlight_php_trimmed(
+ '0 == \'foobar\' // true'
+ );?>
</div>
</div>
<div class="php8-compare__arrow"></div>
<div class="php8-compare__block example-contents">
<div class="php8-compare__label php8-compare__label_new">PHP 8</div>
<div class="php8-code phpcode">
- <pre>0 == 'foobar' // false</pre>
+ <?php highlight_php_trimmed(
+ '0 == \'foobar\' // false'
+ );?>
</div>
</div>
</div>
@@ -306,18 +335,22 @@ if ($session !== null) {
<div class="php8-compare__block example-contents">
<div class="php8-compare__label">PHP 7</div>
<div class="php8-code phpcode">
-<pre>strlen([]); // Warning: strlen() expects parameter 1 to be string, array
given
+ <?php highlight_php_trimmed(
+ 'strlen([]); // Warning: strlen() expects parameter 1 to be
string, array given
-array_chunk([], -1); // Warning: array_chunk(): Size parameter expected to be
greater than 0</pre>
+array_chunk([], -1); // Warning: array_chunk(): Size parameter expected to be
greater than 0'
+ );?>
</div>
</div>
<div class="php8-compare__arrow"></div>
<div class="php8-compare__block example-contents">
<div class="php8-compare__label php8-compare__label_new">PHP 8</div>
<div class="php8-code phpcode">
-<pre>strlen([]); // TypeError: strlen(): Argument #1 ($str) must be of type
string, array given
+ <?php highlight_php_trimmed(
+ 'strlen([]); // TypeError: strlen(): Argument #1 ($str) must
be of type string, array given
-array_chunk([], -1); // ValueError: array_chunk(): Argument #2 ($length) must
be greater than 0</pre>
+array_chunk([], -1); // ValueError: array_chunk(): Argument #2 ($length) must
be greater than 0'
+ );?>
</div>
</div>
</div>
@@ -334,8 +367,11 @@ array_chunk([], -1); // ValueError: array_chunk():
Argument #2 ($length) must be
betere performance en in een aantal specifieke lang-draaiende applicaties
een 1.5 tot tweemaal beter performance.
Typische applicaties draaien minimaal even goed als op PHP 7.4.
</p>
+ <h3 class="php8-h3">
+ Relative JIT contribution to PHP 8 performance
+ </h3>
<p>
- <img src="/images/php8/jit.png" alt="Just-In-Time compilation">
+ <img src="/images/php8/scheme.svg" width="900" alt="Just-In-Time
compilation">
</p>
<h2 class="php8-h2 php8-h2_margin-top">Andere syntax tweaks en
verbeteringen</h2>
@@ -347,7 +383,7 @@ array_chunk([], -1); // ValueError: array_chunk(): Argument
#2 ($length) must be
en closure use lijsten <a
href="https://wiki.php.net/rfc/trailing_comma_in_closure_use_list">RFC</a>.
</li>
<li>
- Sta catch toe zonder variabelenaam <a href="http://TODO">RFC</a>.
+ Sta catch toe zonder variabelenaam <a
href="https://wiki.php.net/rfc/non-capturing_catches">RFC</a>.
</li>
<li>
Fix een aantal inconsistenties in de syntax van variabelen <a
href="https://wiki.php.net/rfc/variable_syntax_tweaks">RFC</a>.
@@ -373,14 +409,11 @@ array_chunk([], -1); // ValueError: array_chunk():
Argument #2 ($length) must be
<h2 class="php8-h2 php8-h2_margin-top">Type systeem en verbeteringen in
foutafhandeling</h2>
<ul>
<li>
- Logischere vergelijking tussen string en nummers<a
href="https://wiki.php.net/rfc/string_to_number_comparison">RFC</a>.
- </li>
- <li>
Striktere type checks voor rekenkundige/bitwise operators
<a
href="https://wiki.php.net/rfc/arithmetic_operator_type_checks">RFC</a>.
</li>
<li>
- Abstracte trait methode validatie <a href="http://TODO">RFC</a>.
+ Abstracte trait methode validatie <a
href="https://wiki.php.net/rfc/abstract_trait_method_validation">RFC</a>.
</li>
<li>
Correcte beschrijving van magische methodes <a
href="https://wiki.php.net/rfc/magic-methods-signature">RFC</a>
@@ -452,7 +485,7 @@ array_chunk([], -1); // ValueError: array_chunk(): Argument
#2 ($length) must be
Krijg betere type-controle.
</h2>
<div class="php8-button-wrapper center">
- <a class="php8-button php8-button_light" href="#">Update naar PHP 8!</a>
+ <a class="php8-button php8-button_light" href="/downloads">Update naar
PHP 8!</a>
</div>
<div class="php8-footer__content">
<p>
@@ -461,7 +494,7 @@ array_chunk([], -1); // ValueError: array_chunk(): Argument
#2 ($length) must be
Een compleet overzicht van verschillen staat in de <a
href="http://www.php.net/ChangeLog-8.php">ChangeLog</a>.
</p>
<p>
- De <a href="http://php.net/manual/en/migration8.php">migration
guide</a> is beschikbaar in de handleiding. Kijk daar voor
+ De <a href="http://php.net/manual/en/migration80.php">migration
guide</a> is beschikbaar in de handleiding. Kijk daar voor
een gedetailleerd overzicht van nieuwe features en wijzigingen die
mogelijk wijzigingen in je code vereisen.
</p>
</div>
--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php