Re: [RFC] Safe Casting Functions
| From: | Andrea Faulds | Date: | Wed, 19 Nov 2014 19:06:09 +0000 |
| Subject: | Re: [RFC] Safe Casting Functions | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-79009@lists.php.net to get a copy of this message | ||
> On 19 Nov 2014, at 19:04, Anatol Belski <anatol.php@belski.net> wrote:
>
> Yeah, try_string(new A) == (string)(new A), but try_int(new A) !=
> (int)(string)(new A) in the RFC. Whereby '10' were pretty valid for int,
> no?
Oh, you’re saying how to_int/to_float don’t accept __toString objects. I suppose they could, but
(int) and (float) don’t accept that, nor do we accept that anywhere else.
--
Andrea Faulds
http://ajf.me/