Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46589 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64897 invoked from network); 31 Dec 2009 18:02:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Dec 2009 18:02:48 -0000 Authentication-Results: pb1.pair.com header.from=philip@roshambo.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=philip@roshambo.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain roshambo.org from 209.85.210.192 cause and error) X-PHP-List-Original-Sender: philip@roshambo.org X-Host-Fingerprint: 209.85.210.192 mail-yx0-f192.google.com Received: from [209.85.210.192] ([209.85.210.192:54573] helo=mail-yx0-f192.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0D/E5-12956-747EC3B4 for ; Thu, 31 Dec 2009 13:02:48 -0500 Received: by yxe30 with SMTP id 30so14823214yxe.29 for ; Thu, 31 Dec 2009 10:02:44 -0800 (PST) Received: by 10.100.222.15 with SMTP id u15mr2212930ang.183.1262282564362; Thu, 31 Dec 2009 10:02:44 -0800 (PST) Received: from ?192.168.1.2? (c-76-22-32-17.hsd1.wa.comcast.net [76.22.32.17]) by mx.google.com with ESMTPS id 6sm5938741yxg.66.2009.12.31.10.02.41 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 31 Dec 2009 10:02:43 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=iso-8859-1 In-Reply-To: <1262265728.2015.3.camel@guybrush> Date: Thu, 31 Dec 2009 10:01:56 -0800 Cc: Derick Rethans , Stanislav Malyshev , RQuadling@googlemail.com, Alexey Zakhlestin , PHP Internals Content-Transfer-Encoding: quoted-printable Message-ID: <592EFB66-8F2C-4F40-827B-A036E6EEEDB9@roshambo.org> References: <4B3C4041.6000406@zend.com> <10845a340912310226rdb09b26v12551fab5aedd5ae@mail.gmail.com> <4B3C7E0C.3030907@zend.com> <1262265728.2015.3.camel@guybrush> To: =?iso-8859-1?Q?Johannes_Schl=FCter?= X-Mailer: Apple Mail (2.1077) Subject: Re: [PHP-DEV] invalid params return value From: philip@roshambo.org (Philip Olson) On Dec 31, 2009, at 5:22 AM, Johannes Schl=FCter wrote: > On Thu, 2009-12-31 at 12:20 +0000, Derick Rethans wrote: >> Hmm, I don't actually think many people test whether parsing = parameters=20 >> failed, but they do test the return value. AFAIK, our "standard" is = to=20 >> return NULL for parameter parsing failures (at least that's what all = the=20 >> examples in README.PARAMETER_PARSING_API do). I'd like to see that be=20= >> the case for all things, but changing it now could be quite a bit of = a=20 >> BC break. >=20 > This is also the documented as the general convention: > http://de.php.net/manual/en/functions.internal.php >=20 > While there are exceptions to this on purpose: For instance get_object > is documented to "Return FALSE if /object/ is not an object" (this > exception was discussed in detail in the past) Ideally the documentation would be explicit, as currently it says: "In this case it will likely return NULL but this is just a convention, = and cannot be relied upon." Knowing exactly which do (and do not) follow this rule would be great. Regards, Philip