Re: [RFC] [Discussion] Allow int type argument to BCMath function

From: Date: Tue, 09 Jul 2024 17:50:54 +0000
Subject: Re: [RFC] [Discussion] Allow int type argument to BCMath function
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Hi

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. Given that once you called a BCMath function the output is a string, the int->string conversion would only happen at the inputs. The performance cost should be fully acceptable and this looks like a premature micro-optimization. Best regards Tim Düsterhus

Thread (12 messages)

« previous php.internals (#124316) next »