[php-src] Issue #11413: Array definition in the method parameter list
| From: | dozsan | Date: | Fri, 09 Jun 2023 12:15:27 +0000 |
| Subject: | [php-src] Issue #11413: Array definition in the method parameter list | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-244643@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/11413
Author: dozsan
### Description
In order to achieve full typedness, it would be nice to be able to specify an array definition typed
in the method.
```
class Foo {}
function methodName(Foo[] $foos): void {}
OR
function methodName(array<Foo> $foos): void {}
methodName([
new Foo(),
new Foo()
])
```