Re: [RFC] [Discussion] Add clamp function
| From: | Niels Dossche | Date: | Thu, 28 Aug 2025 18:23:55 +0000 |
| Subject: | Re: [RFC] [Discussion] Add clamp function | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-128587@lists.php.net to get a copy of this message | ||
> Not sure if I'm too much off track here: As we can't alias classes in userland that
> are internal classes, internally PHP could do the oppsite and given clamp could borrow it out
> to/from \Random\IntervalBoundary given we have enough discipline. That also could buy some time on
> the widening idea and preserve a bit of the conservative approach to further on defer the details
> until necessary.
This is false: you can perfectly make a userland alias of an internal class since PHP 8.3.
PHP can also make aliases of classes internally.