Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78165 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57812 invoked from network); 21 Oct 2014 00:32:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Oct 2014 00:32:51 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 108.166.43.83 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 108.166.43.83 smtp83.ord1c.emailsrvr.com Linux 2.6 Received: from [108.166.43.83] ([108.166.43.83:60354] helo=smtp83.ord1c.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B3/92-42514-2B9A5445 for ; Mon, 20 Oct 2014 20:32:51 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp3.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id 08E0D1800EA; Mon, 20 Oct 2014 20:32:48 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp3.relay.ord1c.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id A41011800D3; Mon, 20 Oct 2014 20:32:47 -0400 (EDT) X-Sender-Id: smalyshev@sugarcrm.com Received: from Stass-MacBook-Pro.local (108-66-6-48.lightspeed.sntcca.sbcglobal.net [108.66.6.48]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA) by 0.0.0.0:465 (trex/5.2.13); Tue, 21 Oct 2014 00:32:47 GMT Message-ID: <5445A9AE.2060001@sugarcrm.com> Date: Mon, 20 Oct 2014 17:32:46 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Andrea Faulds , PHP Internals References: <66B7B28C-2651-4A71-AC2A-55D4C7BB3DDC@ajf.me> In-Reply-To: <66B7B28C-2651-4A71-AC2A-55D4C7BB3DDC@ajf.me> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Safe Casting Functions From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > I am presenting a new RFC to add a set of three functions to do validated casts for scalar types: > > https://wiki.php.net/rfc/safe_cast > > Please read it. The main problem that happened with scalar typing RFC remains here: third set of rules for casting types. Of course, since it's "just" functions and not language constructs, we can have a set of functions for any set of casting rules anybody wants. But I think it's still the same problem here - having three sets of casting rules is not good. Wait, we actually already have FILTER_VALIDATE_INT and FILTER_VALIDATE_FLOAT, so that would be the fourth set of rules, and the second set of validation rules, despite already having an extension specially dedicated to filtering and validation. I think we should not multiply entities needlessly - if we need some different validation primitives, why not add them to filter, for example? -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/