Hi Yasuo, On Wed, Aug 3, 2016 at 1:43 PM, Yasuo Ohgaki <yohg...@ohgaki.net> wrote: > Hi all, > > This RFC is to add validation functions and string validation filter. > > https://wiki.php.net/rfc/add_validate_functions_to_filter > > It also allows to define multiple filters for an input. i.e. You can > apply multiple filter rules for an input. > > Comments are appreciated!
Thanks for this proposal :) Some comments: Exceptions are not exceptional in this case but if there are invalid options or arguments but everything else is expected to succeed or fail. So I am not in favor to have exception here. Naming must have filter_ prefix We do have array filters, validate or filtering functions already I am not sure why we need another function to do very similar things. Most if not all ext/filter users (libraries, components, frameworks) implements their own userfriendly interfaces (classes) and use the existing filter APIs. The developers I talked to prefer to have simple functions but fast, high quality and safe rather than complex APIs for a specific flow, which is most likely won't match their needs. Most of these higher level APIs are also using different approaches and OO based, which simplifies a lot their usage. Cheers, Pierre -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php