Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54909 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34778 invoked from network); 25 Aug 2011 01:10:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Aug 2011 01:10:16 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 67.192.241.143 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.143 smtp143.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.143] ([67.192.241.143:33810] helo=smtp143.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 98/A1-22164-6F0A55E4 for ; Wed, 24 Aug 2011 21:10:15 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp14.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id 90D2229A6FF; Wed, 24 Aug 2011 21:10:12 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp14.relay.dfw1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 3619E29A6DF; Wed, 24 Aug 2011 21:10:11 -0400 (EDT) Message-ID: <4E55A0F3.7090002@sugarcrm.com> Date: Wed, 24 Aug 2011 18:10:11 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:6.0) Gecko/20110812 Thunderbird/6.0 MIME-Version: 1.0 To: Alan Knowles CC: "internals@lists.php.net" References: <1314115682.2635.98.camel@guybrush> <4E545A6C.60704@akbkhome.com> <4E54C658.6070209@akbkhome.com> <887FE7CFF6F8DE4BB3A9535F53AFD06A495AAA2F@il-ex2.zend.net> <887FE7CFF6F8DE4BB3A9535F53AFD06A495AAE17@il-ex2.zend.net> <887FE7CFF6F8DE4BB3A9535F53AFD06A495AB00F@il-ex2.zend.net> <887FE7CFF6F8DE4BB3A9535F53AFD06A495AB153@il-ex2.zend.net> <4E54F0D6.9030005@akbkhome.com> <4E552E46.6070405@sugarcrm.com> <4E5562E1.3070005@lsces.co.uk> <4E556E47.3070301@sugarcrm.com> <4E558B62.1040607@akbkhome.com> In-Reply-To: <4E558B62.1040607@akbkhome.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] PHP 5.3.8 Released! From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! On 8/24/11 4:38 PM, Alan Knowles wrote: > Some real history for the young ones ;) I wonder who you are meaning... :) > So the previous behavior was very likely the 'designed' behavior. Not an > accidental side effect, or bug. Bugs can be very well intentional, but if they use the language wrong way they are bugs. > It's use case is reasonably common when doing tests on mixed returns > (method returns PEAR:error, object or normal value.) That's when you use instanceof. > So we had a situation where a reasonable number of people (eg. anyone > who had used PEAR), had seen and expected the previous behavior. Seeing wrong code somewhere doesn't mean it's not wrong. There's a reason we have the manual. > Please do not fix something that is not broken, and breaks real working > code, just for the hell of it, even in 5.4. is_a() was broken - it was returning different results from essentially the same function is_subclass_of() for no reason at all (no, somebody writing buggy code in PEAR using undocumented parameter types is not a reason). The reason why we kept is_a() and not killed it in favor of instanceof was to have it work with string arguments, since instanceof does not. Thus, string arguments should be handled properly. I can see how it can be argued that 5.3 is mature enough so such changes shouldn't be there, however correct in theory. For 5.4, I see no base for argument here. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227