Re: Simple variable handling.

From: Date: Thu, 11 Aug 2016 15:14:08 +0000
Subject: Re: Simple variable handling.
References: 1 2 3 4 5 6 7 8  Groups: php.internals 
Request: Send a blank email to internals+get-95041@lists.php.net to get a copy of this message
On 11/08/2016 15:49, Lester Caine wrote:
The question is not how you flag an error, but rather when do you check for one. If the 'load' function from a database record or the populate from a web form results in $age not being valid one handles that situation based on the data model. If you are propagating that data after validating has failed then the program flow is wrong and adding some exception when you use the duff data later does nothing to help?
Fair enough, so in summary, what you're looking for is a more comprehensive and/or user-friendly version of the filter_* functions? That is, methods to: - associate validation rules to a variable/array key/object property - manually check whether the validation rules for one or several variables currently pass But you are not particularly interested in language-level enforcement or tracking of whether and when these validation rules have been checked, because you want to insert the validation at specific points in the workflow. Is that an accurate summary? Regards, -- Rowan Collins [IMSoP]

« previous php.internals (#95041) next »