appendices/migration70/new-features.xml
1422d543bf028003a543fd1ce920c6a301a93a51
1422d543bf028003a543fd1ce920c6a301a93a51
...
...
@@ -9,7 +9,7 @@
9
9
10
10
<para>
11
11
Scalar
12
-
<link linkend="functions.arguments.type-declaration">type declarations</link>
12
+
<link linkend="language.types.declarations">type declarations</link>
13
13
come in two flavours: coercive (default) and strict. The following types
14
14
for parameters can now be enforced (either coercively or strictly): strings
15
15
(<type>string</type>), integers (<literal>int</literal>), floating-point
...
...
@@ -44,7 +44,7 @@ int(9)
44
44
top of the file. This means that the strictness of typing for scalars is
45
45
configured on a per-file basis. This directive not only affects the type
46
46
declarations of parameters, but also a function's return type (see
47
-
<link linkend="functions.returning-values.type-declaration">return type declarations</link>,
47
+
<link linkend="language.types.declarations">return type declarations</link>,
48
48
built-in PHP functions, and functions from loaded
49
49
extensions.
50
50
</para>
...
...
@@ -52,7 +52,7 @@ int(9)
52
52
<para>
53
53
Full documentation and examples of scalar type declarations can be found in
54
54
the
55
-
<link linkend="functions.arguments.type-declaration">type declaration</link>
55
+
<link linkend="language.types.declarations">type declaration</link>
56
56
reference.
57
57
</para>
58
58
</sect2>
...
...
@@ -62,12 +62,12 @@ int(9)
62
62
63
63
<para>
64
64
PHP 7 adds support for
65
-
<link linkend="functions.returning-values.type-declaration">return type declarations</link>.
65
+
<link linkend="language.types.declarations">return type declarations</link>.
66
66
Similarly to
67
-
<link linkend="functions.arguments.type-declaration">argument type declarations</link>,
67
+
<link linkend="language.types.declarations">argument type declarations</link>,
68
68
return type declarations specify the type of the value that will be
69
69
returned from a function. The same
70
-
<link linkend="functions.arguments.type-declaration.types">types</link>
70
+
<link linkend="language.types.declarations">types</link>
71
71
are available for return type declarations as are available for argument
72
72
type declarations.
73
73
</para>
...
...
@@ -103,7 +103,7 @@ Array
103
103
<para>
104
104
Full documentation and examples of return type declarations can be found in
105
105
the
106
-
<link linkend="functions.returning-values.type-declaration">return type declarations</link>.
106
+
<link linkend="language.types.declarations">return type declarations</link>.
107
107
reference.
108
108
</para>
109
109
</sect2>
...
...
@@ -269,9 +269,18 @@ object(class@anonymous)#2 (0) {
269
269
<informalexample>
270
270
<programlisting role="php">
271
271
<![CDATA[
272
-
echo "\u{aa}";
273
-
echo "\u{0000aa}";
274
-
echo "\u{9999}";
272
+
<?php
273
+
274
+
echo "\u{aa}", PHP_EOL;
275
+
echo "\u{0000aa}", PHP_EOL;
276
+
277
+
echo "\u{9999}", PHP_EOL;
278
+
279
+
echo <<<EOT
280
+
\u{01f418}
281
+
EOT;
282
+
283
+
?>
275
284
]]>
276
285
</programlisting>
277
286
&example.outputs;
...
...
@@ -383,7 +392,7 @@ bool(true)
383
392
<title>Expectations</title>
384
393
385
394
<para>
386
-
<link linkend="function.assert.expectations">Expectations</link> are a
395
+
Expectations are a
387
396
backwards compatible enhancement to the older <function>assert</function>
388
397
function. They allow for zero-cost assertions in production code, and
389
398
provide the ability to throw custom exceptions when the assertion fails.
...
...
@@ -393,7 +402,7 @@ bool(true)
393
402
While the old API continues to be maintained for compatibility,
394
403
<function>assert</function> is now a language construct, allowing the first
395
404
parameter to be an expression rather than just a <type>string</type> to be
396
-
evaluated or a <type>boolean</type> value to be tested.
405
+
evaluated or a <type>bool</type> value to be tested.
397
406
</para>
398
407
399
408
<informalexample>
...
...
@@ -418,9 +427,8 @@ Fatal error: Uncaught CustomError: Some error message
418
427
419
428
<para>
420
429
Full details on this feature, including how to configure it in both
421
-
development and production environments, can be found in the
422
-
<link linkend="function.assert.expectations">expectations section</link>
423
-
of the <function>assert</function> reference.
430
+
development and production environments, can be found on the manual page
431
+
of the <function>assert</function> language construct.
424
432
</para>
425
433
</sect2>
426
434
...
...
@@ -640,7 +648,7 @@ session_start([
640
648
</sect2>
641
649
642
650
<sect2 xml:id="migration70.new-features.csprng-functions">
643
-
<title><link linkend="book.csprng">CSPRNG</link> Functions</title>
651
+
<title>CSPRNG Functions</title>
644
652
645
653
<para>
646
654
Two new functions have been added to generate cryptographically secure
647
655