On 05.08.2016 at 02:15, Yasuo Ohgaki wrote:

> Pierre suggested the functions should be named "filter_*" and I agree.
> 
> On Fri, Aug 5, 2016 at 6:25 AM, Yasuo Ohgaki <yohg...@ohgaki.net> wrote:
>> Input validation is like assertion shouldn't fail.
> 
> How about
> 
> filter_assert_var()              <- validate_var()
> filter_assert_var_array()     <- validate_var_array()
> filter_assert_input()           <- validate_input()
> filter_assert_input_array()  <- validate_input_array()
> 
> It seems better than
> 
> filter_validate_*()
> 
> to me. These names encourage users to use them for input 
> assertion(validation).
> 
> Any other good names?

I think the names are okay, but it should be pointed out that they are
not related to assert() (particularly, that they are not affected by the
assert.* ini directives).  Maybe "assume" or "require" instead of
"assert" would therefore be better in this regard.

-- 
Christoph M. Becker


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to