Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53679 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79371 invoked from network); 29 Jun 2011 20:26:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jun 2011 20:26:01 -0000 Authentication-Results: pb1.pair.com header.from=dragoonis@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dragoonis@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.210.170 as permitted sender) X-PHP-List-Original-Sender: dragoonis@gmail.com X-Host-Fingerprint: 209.85.210.170 mail-iy0-f170.google.com Received: from [209.85.210.170] ([209.85.210.170:43400] helo=mail-iy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 56/A0-10518-85A8B0E4 for ; Wed, 29 Jun 2011 16:26:01 -0400 Received: by iym1 with SMTP id 1so1593240iym.29 for ; Wed, 29 Jun 2011 13:25:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=HcjL/PmM3e7XxuInVPcm6DoGCbdEf4Kgvv8G+sReohU=; b=kbo8B50GIC0j76+AL110Dri6qNZokTQQpZNkFGKu/iD3c64ibZmZwZ0qdvhnn8AZfu YA+I6K2dPZdzLfdyd36zOpIpmiA7fEWBERot6GFBmuUvLmPlJSsGXdWpr2f0rfLzc9Ff KcqopGMAZaLA4/m9oDQBjMa6OhT1kphCbWUf8= MIME-Version: 1.0 Received: by 10.42.154.198 with SMTP id r6mr1138164icw.276.1309379158288; Wed, 29 Jun 2011 13:25:58 -0700 (PDT) Received: by 10.42.108.70 with HTTP; Wed, 29 Jun 2011 13:25:58 -0700 (PDT) In-Reply-To: <2A11AEAB-C62D-4FAB-86BF-A6651B40DC10@bitextender.com> References: <4E0B7F82.5080006@smashlabs.com> <2297BE5C-4B5F-4C16-9624-4137B63329FD@bitextender.com> <4E0B81D4.3080205@smashlabs.com> <2A11AEAB-C62D-4FAB-86BF-A6651B40DC10@bitextender.com> Date: Wed, 29 Jun 2011 21:25:58 +0100 Message-ID: To: =?ISO-8859-1?Q?David_Z=FClke?= Cc: Ralph Schindler , internals , Dmitry Stogov Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Fix for #53727 (is_subclass_of resolution with interfaces) From: dragoonis@gmail.com (Paul Dragoonis) On Wed, Jun 29, 2011 at 9:22 PM, David Z=FClke wrote: > On 29.06.2011, at 22:20, Paul Dragoonis wrote: > >> On Wed, Jun 29, 2011 at 8:49 PM, Ralph Schindler w= rote: >>> Correct. >>> >>> I was hasty in that example, the first was copied & tested (and is refl= ected >>> in the test, as is that variation of what I wrote up.) >>> >>> Either way, test and patch work in 5_3. >> >> Doesn't this functionality confuse matters? >> >> If this patch is added, is there now no difference between instanceof >> and is_subclass_of(). If this is the case my question is then why do >> we have two methods to do the same thing? >> >> I thought instanceof was for parent classes + interfaces.. and >> is_subclass_of() was just for parent classes. > > instanceof is a language construct and only operates on object instances. > I didn't spot you could pass a string into is_subclass_of() I thought it was only objects. With that in mind it would be good to have subclass_of() include interfaces. > David > > >