Re: [RFC] Safe Casting Functions
| From: | Stanislav Malyshev | Date: | Thu, 20 Nov 2014 01:28:19 +0000 |
| Subject: | Re: [RFC] Safe Casting Functions | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-79018@lists.php.net to get a copy of this message | ||
Hi!
> I like this RFC overall. Precise parameter checks is good for security
> always.
I don't see how it matters for security at all. If you need an int,
(int) works as well as any proposed check, security-wise. You may want
different diagnostics, etc. but this doesn't have to do much with
security. In other words, if the security depends on any differences
between (int) and to_int, it's probably not done right.
--
Stas Malyshev
smalyshev@gmail.com