Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46591 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10354 invoked from network); 1 Jan 2010 02:35:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Jan 2010 02:35:48 -0000 Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.185 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 212.25.124.185 il-mr1.zend.com Received: from [212.25.124.185] ([212.25.124.185:59848] helo=il-mr1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 36/3C-12956-28F5D3B4 for ; Thu, 31 Dec 2009 21:35:47 -0500 Received: from us-gw1.zend.com (unknown [192.168.16.5]) by il-mr1.zend.com (Postfix) with ESMTP id 1E881504F9; Fri, 1 Jan 2010 04:20:27 +0200 (IST) Received: from [192.168.27.1] ([192.168.27.1]) by us-gw1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 31 Dec 2009 18:35:41 -0800 Message-ID: <4B3D5F7C.1090209@zend.com> Date: Thu, 31 Dec 2009 18:35:40 -0800 Organization: Zend Technologies User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091204 Lightning/1.0b2pre Thunderbird/3.0 MIME-Version: 1.0 To: =?UTF-8?B?Sm9oYW5uZXMgU2NobMO8dGVy?= CC: Derick Rethans , RQuadling@googlemail.com, Alexey Zakhlestin , PHP Internals References: <4B3C4041.6000406@zend.com> <10845a340912310226rdb09b26v12551fab5aedd5ae@mail.gmail.com> <4B3C7E0C.3030907@zend.com> <1262265728.2015.3.camel@guybrush> In-Reply-To: <1262265728.2015.3.camel@guybrush> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 01 Jan 2010 02:35:41.0571 (UTC) FILETIME=[1C709D30:01CA8A8B] Subject: Re: [PHP-DEV] invalid params return value From: stas@zend.com (Stanislav Malyshev) Hi! > This is also the documented as the general convention: > http://de.php.net/manual/en/functions.internal.php > > 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) I would argue for is_object getting argument which is not an object is not an args parsing error (since this function is supposed to accept args of all types). Getting no argument, on the other hand, is. Though is_object would return false in both cases. But is_numeric(), for example, would produce null when called with no arguments. It's a real mess there. Thanks however for bringing up that manual part - I didn't know it's there. That makes me think case for NULL is much stronger. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com