Re: [RFC] Safe Casting Functions
| From: | Andrea Faulds | Date: | Mon, 20 Oct 2014 23:18:41 +0000 |
| Subject: | Re: [RFC] Safe Casting Functions | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-78162@lists.php.net to get a copy of this message | ||
> On 21 Oct 2014, at 00:16, Haralan Dobrev <hkdobrev@gmail.com> wrote:
>
> In general I like this RFC.
>
> I don't see why to_string would not accept and cast integers and floats to strings. And
> even if there is a valid reason it is not mentioned.
It does accept and cast integers and floats to strings… I made an error in the Proposal section,
my bad. If you look at the examples table and the tests in the patch, they are indeed accepted.
> If this gets accepted you should consider the naming in the user documentation. Beginners
> should not consider these functions "safe" as in "security", but only
> "safe" as in "no data loss”.
Right.
--
Andrea Faulds
http://ajf.me/