Hey Kyle,

On Wed, 27 Aug 2025 at 15:35, Kyle Katarn <kylekatar...@gmail.com> wrote:

> Hello,
>
> I handled the feedback received on the draft RCF
> https://wiki.php.net/rfc/clamp_v2
>

I know this isn't very used in internals, but does it make sense to write
generics for the generated stubs of this function?

Specifically, I'd expect input, min and max to be bound to the same exact
type:

```php
/**
 * @template T
 * @param T $value
 * @param T $min
 * @param T $max
 * @return T
 */
function clamp (mixed $value, mixed $min, mixed $max): mixed {
   // ...
}
```

Greets,

Marco Pivetta

https://mastodon.social/@ocramius

https://ocramius.github.io/

Reply via email to