Skip to content

Commit 0219f62

Browse files
committed
*Declaring* mandatory after optional parameters is deprecated
It's not about *passing* of the arguments.
1 parent d6eb5fd commit 0219f62

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

language/functions.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,15 +228,15 @@ function takes_many_args(
228228
</programlisting>
229229
</example>
230230
<para>
231-
As of PHP 8.0.0, passing mandatory arguments after optional arguments
231+
As of PHP 8.0.0, declaring mandatory arguments after optional arguments
232232
is deprecated. This can generally be resolved by dropping the default value.
233233
One exception to this rule are arguments of the form
234234
<code>Type $param = null</code>, where the &null; default makes the type implicitly
235235
nullable. This usage remains allowed, though it is recommended to use an
236236
explicit nullable type instead.
237237
</para>
238238
<example>
239-
<title>Passing optional arguments after mandatory arguments</title>
239+
<title>Declaring optional arguments after mandatory arguments</title>
240240
<programlisting role="php">
241241
<![CDATA[
242242
<?php

0 commit comments

Comments
 (0)