Re: [PHP-DEV] Sponsor link on github.com/php

2021-11-23 Thread Kim Hallberg
> On 22 Nov 2021, at 11:32 PM, Nils Adermann wrote: > > On 22.11.21 23:07, Kim Hallberg wrote: >> >>> On 22 Nov 2021, at 10:53 PM, Sara Golemon wrote: >>> >>> Now that the new PHP Foundation has been announced, I've been asked if we'd >>>

Re: [PHP-DEV] Sponsor link on github.com/php

2021-11-22 Thread Kim Hallberg
> On 22 Nov 2021, at 10:53 PM, Sara Golemon wrote: > > Now that the new PHP Foundation has been announced, I've been asked if we'd > mind configuring a Sponsor button on our github.com project profile. >

[PHP-DEV] Re: [RFC] clamp

2021-07-08 Thread Kim Hallberg
> On 23 Jun 2021, at 8:42 PM, Kim Hallberg wrote: > > Hello internals, > > The RFC for the clamp function is now open and under discussion, you now have > 2 weeks > to discuss, suggest improvements and open issues before voting is considered. > > Any a

[PHP-DEV] Re: [RFC] clamp

2021-07-08 Thread Kim Hallberg
> On 23 Jun 2021, at 8:42 PM, Kim Hallberg wrote: > > Hello internals, > > The RFC for the clamp function is now open and under discussion, you now have > 2 weeks > to discuss, suggest improvements and open issues before voting is considered. > > Any a

Re: [PHP-DEV] [RFC] clamp

2021-07-03 Thread Kim Hallberg
> On 28 Jun 2021, at 11:16 AM, Nikita Popov wrote: > > The RFC is missing a precise description of how this function works with NaN > and negative zero. The expected behavior is that if min or max are NaN, an > exception is thrown, if num if NaN then NaN is returned, and the behavior wrt >

Re: [PHP-DEV] [RFC] clamp

2021-07-03 Thread Kim Hallberg
> On 24 Jun 2021, at 1:50 AM, tyson andre wrote: > > So I think the major objections are that: > > 1. This is easy to implement in userland and there's negligible performance > benefit > (in code that is a performance sensitive loop, it may still be worse > compared to `$num < $min ? $min :

[PHP-DEV] [RFC] clamp

2021-06-23 Thread Kim Hallberg
tps://wiki.php.net/rfc/clamp> The implementation is available in a PR here: https://github.com/php/php-src/pull/7191 <https://github.com/php/php-src/pull/7191> Thank you, Kim Hallberg

[PHP-DEV] Requesting RFC karma

2021-06-23 Thread Kim Hallberg
Hi internals, With the initial attitude for the clamp proposal being mostly positive I am moving ahead with the RFC and am therefore requesting RFC karma to create this RFC. If anyone would like to grant me this karma my username for the wiki is: thinkverse Thank you, Kim Hallberg. -- PHP

[PHP-DEV] Re: Proposal: clamp

2021-06-23 Thread Kim Hallberg
> On 23 Jun 2021, at 2:25 AM, Kim Hallberg wrote: > > Greetings internals, > > I present to you a proposal for a new basic math function: clamp. > > function clamp(int|float $num, int|float $min, int|float $max): int|float {} Instead of answering each response i

[PHP-DEV] Proposal: clamp

2021-06-22 Thread Kim Hallberg
since the function cannot be redeclared. I've implemented this feature a few months ago already. - Link: https://github.com/thinkverse/php-src/pull/1 <https://github.com/thinkverse/php-src/pull/1> What are your opinions on this function? Regards, Kim Hallberg.