Re: [RFC] [Discussion] Allow int type argument to BCMath function
| From: | Derick Rethans | Date: | Wed, 10 Jul 2024 09:07:55 +0000 |
| Subject: | Re: [RFC] [Discussion] Allow int type argument to BCMath function | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-124336@lists.php.net to get a copy of this message | ||
On Tue, 9 Jul 2024, Tim Düsterhus wrote:
> On 7/8/24 06:29, Saki Takamachi wrote:
>
> > I don't think a satisfactory specification will be decided on this
> > before the feature freeze, so I will not rush into discussing this
> > RFC for now. Of course, no voting will take place until the
> > specifications are decided. If we were to discuss this change again,
> > it would be in versions beyond 8.4.
>
> I agree with Juliette that as long as passing a non-integer float to
> an int parameter is only a deprecation warning, widening the signature
> to
string|int is too much of a breaking change.
I agree too, and don't think we should change this in PHP 8.x.
and probably would also question:
"bcfloor() and bcceil() are excluded because there is no point in
allowing int type arguments due to the characteristics of their
functions. "
Although that is right, having these *also* accept ints would at least
be consistent.
cheers,
Derick