Re: [RFC] Add "is_representable_as_float()" and "is_representable_as_int()" functions
| From: | Alexandre Daubois | Date: | Wed, 30 Jul 2025 06:40:52 +0000 |
| Subject: | Re: [RFC] Add "is_representable_as_float()" and "is_representable_as_int()" functions | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-128313@lists.php.net to get a copy of this message | ||
> So if you think one should know, you probably should not need this function
> at all.
That's right. I'd also say that since the aim is to have better
interoperability between systems, mixed seems judicious. For example,
a bool or a null can occur.
> Btw. is_primitive() was not a thing last time I looked. It would be great
> though to have the combined test of is_scalar() and is_null() in a single
> function call.
I like the idea. Would it have its place in this RFC? I feel like it
could with a separate vote, but maybe this would require its own RFC.