[php-src] Issue #20822: #[ParameterName]
| From: | geek-merlin | Date: | Fri, 02 Jan 2026 13:48:46 +0000 |
| Subject: | [php-src] Issue #20822: #[ParameterName] | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-251463@lists.php.net to get a copy of this message | ||
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');
```