Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95041 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31372 invoked from network); 11 Aug 2016 15:16:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Aug 2016 15:16:41 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.44 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.44 mail-wm0-f44.google.com Received: from [74.125.82.44] ([74.125.82.44:35659] helo=mail-wm0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 99/D0-25876-8D69CA75 for ; Thu, 11 Aug 2016 11:16:41 -0400 Received: by mail-wm0-f44.google.com with SMTP id f65so5889967wmi.0 for ; Thu, 11 Aug 2016 08:16:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=NAX6qHkhQq4F+Nd/OgWdMEtdJG5cANQ+ANynfH+dlRw=; b=ARXQOMmSc3uxXkBv+IHvIJQP1dLbfMwIORkbhQ/L3NRpQREd9yHr5SK7P9wtAmDwdq Ctn/EMi0dwfGX59Z3ahJgl7JjT5xezmNB1RSWTTw49PMfNhGJuux/7c/YmVEbnEAmT6u sW022Nessq7tf+b64NSFeQD38GFhwGWWjuXAQMVbXP9+a2EMeSO0/JfQbzO7vsYd/wyC DTNdFQmdwkSmrp7i8uL2KUdiwjzLFEFT2/4VAIbpJGA0wKwWMBfLrAwqHYhL4hjHKYHd JNVRZReGN9r5CnxAHTQmFmOktLlMZq7HXg/x9Jc+gD/ffhZsWrQehhqqdwKF+sJAkzYD e9ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=NAX6qHkhQq4F+Nd/OgWdMEtdJG5cANQ+ANynfH+dlRw=; b=FHQcN4zXq7oLOKQQSQS5gkmRBAMmP/jmUfQqnwxIRXc3CvgC9ULCdjToAE3eGYnOPW JDnsOR79N9zFba0MVMT4eCRxCyuXHB7K86/VjYtKqZJTKyxCDwUjvYHxgwZeCKcDcawr 7HEsdL04lmmQgp6D51XBJ6ee6YT2EasjwHkMS05ULL5ucRArxq5EZ19aK40jfZBMSK+2 E/PnALwKjG9gUuOmJG/YDbTiG/Fj5rR8/FUBVc5Jl0pMm1u5sUoZxTxRwpNPTm40nc+L 4bZgkddXxBj46CNx0rY/ozwMs0QQ4+tyIEdaFJxMBrf/enIJaVlxhkPPEVvYJTBJj0v9 3jEA== X-Gm-Message-State: AEkoouvkjscx0HNtezLPX+OyJHkxdXtGKJlchrcO5c3fRcoPDxzTD+Zxrgnth1+n6hm2Cw== X-Received: by 10.194.47.7 with SMTP id z7mr9935401wjm.63.1470928596587; Thu, 11 Aug 2016 08:16:36 -0700 (PDT) Received: from [192.168.0.98] ([93.188.182.58]) by smtp.gmail.com with ESMTPSA id c139sm576884wme.4.2016.08.11.08.16.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Aug 2016 08:16:35 -0700 (PDT) To: internals@lists.php.net References: <10fbcb03-5de8-4d9a-da1c-7e2bf77937cb@lsces.co.uk> <5657afc7-7569-5fc4-4a5a-27ed786c4fa5@gmail.com> <0825c173-5cb4-7f65-cf34-b45ca30919a3@lsces.co.uk> Message-ID: <8646c3ad-b929-cb0b-bad4-52a0a7160d16@gmail.com> Date: Thu, 11 Aug 2016 16:14:08 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <0825c173-5cb4-7f65-cf34-b45ca30919a3@lsces.co.uk> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Simple variable handling. From: rowan.collins@gmail.com (Rowan Collins) 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]