[php-src] Issue #20822: #[ParameterName]
[email protected] (geek-merlin)
| Newsgroups | php.bugs |
|---|---|
| Message-ID | <Yks5DicCGH95RnZgAYm7fphRvviSaR6w0sGAEkieqkQ@main.internal.php.net> |
Issue: https://github.com/php/php-src/issues/20822
Author: geek-merlin
### Description
## Problem
When calling parameters by name, the name is locked to the variable name.
## Approach
Use an attribute to unlock that.
## Example
```
function foo(#[ParameterName('service_id')] string $serviceId) {...}
foo(service_id: 'logger');
```