Skip to content

Commit 63881f1

Browse files
committed
Describe named arguments.
1 parent 9dc210d commit 63881f1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

spec.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,12 +513,12 @@ function fooBarBaz($arg1, &$arg2, $arg3 = [])
513513
}
514514
```
515515

516-
### 4.5 Method and Function Arguments
516+
### 4.5 Method and Function Parameters
517517

518518
In the argument list, there MUST NOT be a space before each comma, and there
519519
MUST be one space after each comma.
520520

521-
Method and function arguments with default values MUST go at the end of the argument
521+
Method and function parameters with default values MUST go at the end of the argument
522522
list.
523523

524524
```php
@@ -631,6 +631,10 @@ public function process(string $algorithm, &...$parts)
631631
}
632632
```
633633

634+
When invoking a function or method, the same rules apply for the arguments to the function as for the parameters.
635+
Additionally, if using named arguments, there MUST NOT be a space between the argument name
636+
and colon, and there MUST be a single space between the colon and the argument value.
637+
634638
### 4.6 Modifier Keywords
635639

636640
Properties and methods of a class have numerous keyword modifiers that alter how the

0 commit comments

Comments
 (0)