Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53697 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78233 invoked from network); 30 Jun 2011 07:40:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Jun 2011 07:40:04 -0000 Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.199.177.89 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 212.199.177.89 il-mr1.zend.com Received: from [212.199.177.89] ([212.199.177.89:48030] helo=il-mr1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F0/40-10401-3582C0E4 for ; Thu, 30 Jun 2011 03:40:04 -0400 Received: from il-gw1.zend.com (unknown [10.1.1.22]) by il-mr1.zend.com (Postfix) with ESMTP id 443AE60711; Thu, 30 Jun 2011 10:38:54 +0300 (IDT) Received: from tpl2.home (10.1.10.21) by il-ex2.zend.net (10.1.1.22) with Microsoft SMTP Server id 14.1.255.0; Thu, 30 Jun 2011 10:39:58 +0300 Message-ID: <4E0C284B.1050601@zend.com> Date: Thu, 30 Jun 2011 11:39:55 +0400 User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Lightning/1.0b3pre Thunderbird/3.1.10 MIME-Version: 1.0 To: Ralph Schindler CC: internals , References: <4E0B7F82.5080006@smashlabs.com> In-Reply-To: <4E0B7F82.5080006@smashlabs.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.1.10.21] Subject: Re: Fix for #53727 (is_subclass_of resolution with interfaces) From: dmitry@zend.com (Dmitry Stogov) Hi Ralph, I agree with expected behavior, but didn't understand the patch and which side effects it may have as well as the original implementation of is_a_impl(). It looks for me like one huge bug :) Please reassign the bug to me, if you like me to take a deeper look. I can do it only on next week. Thanks. Dmitry. On 06/29/2011 11:39 PM, Ralph Schindler wrote: > Hi all, > > Concerning: https://bugs.php.net/bug.php?id=53727 > > I had put together a quick patch against PHP_5_3 to fix, for what I and > others might consider, an issue with is_subclass_of() returning false in > this situation: > > interface A {} > class B implements A {} > var_dump(is_subclass_of('B', 'A')); // false, should be true > > It returns false in situations where a class does not have a parent. If > a parent currently exists, the above works fine. For example: > > interface A {} > class B implements A {} > class C extends B {} > var_dump(is_subclass_of('B', 'A')); // true > > Attached is a patch against PHP_5_3, I can create a patch against > PHP_5_4 if need be. > > I've added a test file and all the current Zend/tests run as expected. > > Thanks, > Ralph