Re: [RFC] Add clamp function
| From: | Morgan | Date: | Fri, 22 Aug 2025 20:27:32 +0000 |
| Subject: | Re: [RFC] Add clamp function | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-128535@lists.php.net to get a copy of this message | ||
On 2025-08-23 05:29, Kyle Katarn wrote:
Also from my point of view, min($max, max($min, $value)) has a counter- intuitive reading when used to clamp a value.Well, that's trivial to deal with: min(max($min, $value), $max));