> On 22 Oct 2014, at 22:31, Stas Malyshev <smalys...@sugarcrm.com> wrote: > > Hi! > >> Are you opposed to the existence of ext/filter given it has >> FILTER_VALIDATE_INT, a “primitive for handling type conversions”? > > FILTER_VALIDATE_INT is an option for a filter_var function, and it is > not introducing any new rules for handling types in the engine.
Nor is this. > What you are proposing is not like FILTER_VALIDATE_INT, it's like (int). I don’t see the difference: $x = filter_var(FILTER_VALIDATE_INT, $foo); $x = to_int($foo); They’re very similar, except the latter has slightly different rules, is shorter, and if some people (possibly me) get their way, might throw an exception. -- Andrea Faulds http://ajf.me/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php