Re: [PHP-DEV] [DISCUSSION] Adding the "is_integer_safe()" function

2025-07-26 Thread Alexandre Daubois
> That suggests maybe the name should communicate "safe for JavaScript"; or > more generally "safe for 64-bit IEEE floating point". > > is_safe_for_js() > is_safe_for_float() I'm not sure we should mention Javascript, because it's actually related to floating point storage. > I'm not sure if acc

Re: [PHP-DEV] Validating #[\Attribute] targets

2025-07-26 Thread Claude Pache
> Le 25 juil. 2025 à 18:37, Daniel Scherzer a > écrit : >  > Hi internals, > > The #[\Attribute] attribute is used to mark classes as being usable as > attributes. It currently does not trigger any error if added to a trait, > interface, enum, or abstract class. However, if any of those *we

Re: [PHP-DEV] [RFC] Warnings for PHP 8.5

2025-07-26 Thread Claude Pache
> Le 14 juil. 2025 à 18:23, Gina P. Banyard a écrit : > Hello internals, > > Similar to the mass deprecation RFC, I would like to propose the addition of > a few warnings in certain situations: > https://wiki.php.net/rfc/warnings-php-8-5 > > I am expecting these 4 sub-proposals to be mostly

Re: [PHP-DEV] [DISCUSSION] Adding the "is_integer_safe()" function

2025-07-26 Thread Rowan Tommins [IMSoP]
On 26/07/2025 07:13, Alexandre Daubois wrote: The idea is to have a function that receives an integer or a float and returns bool if the provided argument is inside the safe Javascript integer interval, namely [-(2^53)+1 ; (2^53)-1]. That suggests maybe the name should communicate "safe for Ja

Re: [PHP-DEV] Validating #[\Attribute] targets

2025-07-26 Thread Rob Landers
On Sat, Jul 26, 2025, at 13:29, Juris Evertovskis wrote: > Hey, > > > if you are not going to call ReflectionAttribute::newInstance(), then you > > don't > > really need to mark the trait/interface/enum/abstract class as an attribute. > > Personally I never knew the `#[\Attribute]` is only r

RE: [PHP-DEV] Validating #[\Attribute] targets

2025-07-26 Thread Juris Evertovskis
Hey, > if you are not going to call ReflectionAttribute::newInstance(), then you > don't > really need to mark the trait/interface/enum/abstract class as an attribute. Personally I never knew the `#[\Attribute]` is only required to do `->newInstance()`. The docs make it seem like it’s

Re: [PHP-DEV] Validating #[\Attribute] targets

2025-07-26 Thread Rob Landers
On Fri, Jul 25, 2025, at 18:33, Daniel Scherzer wrote: > Hi internals, > > The #[\Attribute] attribute is used to mark classes as being usable as > attributes. It currently does not trigger any error if added to a trait, > interface, enum, or abstract class. However, if any of those *were* use