Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54914 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60232 invoked from network); 25 Aug 2011 04:58:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Aug 2011 04:58:18 -0000 Authentication-Results: pb1.pair.com smtp.mail=agalkin@agalkin.ru; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=agalkin@agalkin.ru; sender-id=unknown Received-SPF: error (pb1.pair.com: domain agalkin.ru from 83.222.23.61 cause and error) X-PHP-List-Original-Sender: agalkin@agalkin.ru X-Host-Fingerprint: 83.222.23.61 relay1.mail.masterhost.ru Received: from [83.222.23.61] ([83.222.23.61:61632] helo=relay1.mail.masterhost.ru) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FE/A2-40681-666D55E4 for ; Thu, 25 Aug 2011 00:58:15 -0400 Received: from [UNAVAILABLE] ([195.91.158.149] helo=[172.16.48.205]) by relay1.mail.masterhost.ru with esmtp envelope from authenticated with agalkin@agalkin.ru message id 1QwS10-000OIK-36; Thu, 25 Aug 2011 08:58:06 +0400 Mime-Version: 1.0 (Apple Message framework v1244.3) Content-Type: text/plain; charset=us-ascii In-Reply-To: <4E55AA89.5050505@akbkhome.com> Date: Thu, 25 Aug 2011 08:58:05 +0400 Cc: Stas Malyshev , "internals@lists.php.net" Content-Transfer-Encoding: quoted-printable Message-ID: 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> <4E55A0F3.7090002@sugarcrm.com> <4E55AA89.5050505@akbkhome.com> To: alan@akbkhome.com X-Mailer: Apple Mail (2.1244.3) X-SpamTest-Envelope-From: agalkin@agalkin.ru X-SpamTest-Group-ID: 00000000 X-SpamTest-Info: Profiles 24421 [Aug 25 2011] X-SpamTest-Method: none X-SpamTest-Rate: 0 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0284], KAS30/Release Subject: Re: [PHP-DEV] PHP 5.3.8 Released! From: agalkin@agalkin.ru (Aleksandr Galkin) For the record, I'd like to point out I do need the new behaviour. In 5.3.6 you need reflection to check if a class implements an = interface. You also need to check is_subclass_of AND compare the lowercased = classes. All that is about 5 times slower than is_a in 5.3.8. Probably it should be class_is_a() instead of altering is_a() behaviour, but the need to match class names against each other is pretty much = real. Sincerely yours, Aleksandr. On Aug 25, 2011, at 05:51, alan@akbkhome.com wrote: > I'm not sure it's possible to get agreement on if this is a bug or = not, you might see a bug, I just see this as a pointless change for = consistency that pretty much nobody will ever need or use. >=20 > I think I'll leave it as > a) no bug was ever reported on the previous behaviour. >=20 > b) intended "design" of is_subclass_of was originally to return false = on non-object - andrei (1999) > = http://svn.php.net/viewvc/php/php-src/trunk/Zend/zend_builtin_functions.c?= r1=3D17245&r2=3D17272 = >=20 > c) is_a() was introduced by sebastian (2002) and kept this intended = behaviour > = http://svn.php.net/viewvc/php/php-src/trunk/Zend/zend_builtin_functions.c?= r1=3D67102&r2=3D69234 = >=20 > d) when andrey (2004) proposed the change to accepts strings on = is_subclass_of, he deliberately maintained the existing behaviour for = is_a() > = http://svn.php.net/viewvc/php/php-src/trunk/Zend/zend_builtin_functions.c?= r1=3D170604&r2=3D171349 = >=20 > e) is_a() has a valid use case , and is currently reasonably commonly = used. >=20 > d) the new behaviour is an uncommon use case, and can be done very = easily in other ways. >=20 >=20 > BTW. we could really do with a searchable archive of php.dev + = internals... - It's pretty difficult to find out if this was ever = discussed before.. >=20 > Regards > Alan