Doc #80622 [Nab]: Optional argument brackets
| From: | cmb@php.net | Date: | Wed, 13 Jan 2021 13:54:18 +0000 |
| Subject: | Doc #80622 [Nab]: Optional argument brackets | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-18382@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=80622&edit=1
ID: 80622
Updated by: cmb@php.net
Reported by: grzesiek at gbankowski dot pl
Summary: Optional argument brackets
Status: Not a bug
Type: Documentation Problem
Package: Documentation problem
Operating System: irrelevant
PHP Version: Irrelevant
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Actually, this case is not related to the mentioned PR, but rather
because variable-length argument lists[1] can be empty.
[1] <https://www.php.net/manual/en/functions.arguments.php#functions.variable-arg-list>
Previous Comments:
------------------------------------------------------------------------
[2021-01-13 13:42:05] cmb@php.net
This has been done to match PHP's syntax for user defined
functions more closely[1].
[1] <https://github.com/php/phd/pull/37Y>
------------------------------------------------------------------------
[2021-01-13 13:35:17] grzesiek at gbankowski dot pl
Description:
------------
Dear PHP webmasters,
I'm writting to inform that, in all funcions disappeared brackets [] for optional arguments.
Why?
sscanf ( string $string , string $format , mixed &...$vars ) : array|int|null
$vars is optional, but where are brackets?
Best regards
Grzegorz
Test script:
---------------
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80622&edit=1