Re: Re: Adding validate_var_array()/validate_input_array() to which version?

From: Date: Tue, 02 Aug 2016 14:37:21 +0000
Subject: Re: Re: Adding validate_var_array()/validate_input_array() to which version?
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-94803@lists.php.net to get a copy of this message
On 01/08/2016 23:12, Yasuo Ohgaki wrote:
Raising Exception would be prefered. Any comment raising exception? ExceptionFilterValidate wouldn't cause much BC, IMO.
I don't follow. Do you mean throwing an exception to the existing filter-and-continue functions? If so, that would surely break every single use of those functions. Or do you mean adding a new function which either silently succeeds or throws an exception? That doesn't sound good to me - an exception shouldn't be the expected result of something, and invalid input is an expected condition (just an undesirable one). It's easier to add a throw statement based on a boolean result than to catch an exception and continue with other checks. I may have misunderstood your question, though. Regards, -- Rowan Collins [IMSoP]

« previous php.internals (#94803) next »