Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61259 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1080 invoked from network); 15 Jul 2012 22:34:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jul 2012 22:34:12 -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 67.192.241.113 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.113 smtp113.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.113] ([67.192.241.113:33700] helo=smtp113.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 40/E0-20866-26543005 for ; Sun, 15 Jul 2012 18:34:11 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp11.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id 1268FD03F8; Sun, 15 Jul 2012 18:34:08 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp11.relay.dfw1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id AE8CCD0324; Sun, 15 Jul 2012 18:34:07 -0400 (EDT) Message-ID: <5003455F.5060707@sugarcrm.com> Date: Sun, 15 Jul 2012 15:34:07 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 MIME-Version: 1.0 To: Pierre Joye CC: PHP Internals References: <50025BCE.1090409@sugarcrm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] bug #49510 From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > The question is more about the correctness of the doc, and to what I > remember (I implemented that NULL on failure thing), the doc is wrong. Well, the question is if '' is an acceptable boolean expressing false or an error. I could see an argument for either, e.g. if you're having a config file you could say for boolean config var 'foo_bar=0' and 'foo_bar=' means the same thing, or you could choose the second to be invalid. It is a bit complicated by the fact that people are somewhat confused about the idea that filter_var works on strings, so they think boolean 'false' should be OK with it. Again, if we say foo_bar= is OK, then false will be OK too, though not because of the reasons some people think of. > And the null on failure was mainly implemented for this exact case > (boolean validation). Yeah I understand that, the question is then if '' can be sought as a valid boolean string meaning false, or as an error. I lean slightly to the side of '' being accepted, but if somebody has any argument against it, please let it be heard. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227