Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53681 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85689 invoked from network); 29 Jun 2011 21:05:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jun 2011 21:05:55 -0000 Authentication-Results: pb1.pair.com header.from=martinscotta@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=martinscotta@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.170 as permitted sender) X-PHP-List-Original-Sender: martinscotta@gmail.com X-Host-Fingerprint: 209.85.220.170 mail-vx0-f170.google.com Received: from [209.85.220.170] ([209.85.220.170:35831] helo=mail-vx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7E/81-10518-0B39B0E4 for ; Wed, 29 Jun 2011 17:05:53 -0400 Received: by vxi39 with SMTP id 39so1307065vxi.29 for ; Wed, 29 Jun 2011 14:05:49 -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; bh=ryOqMihLhkOhdxCfvSayH3QtuOdutICNdz9+/zZOXp0=; b=vULWYFzQg6XmtIl6eicE/TWnOXPAeqZdD+3J/Rg/A8FmXn9gsucCMrfEOWsUGPoRfS MI2ZBjHJUSPCsAzSMphnWgHHonWLHJ32KvX3xu4/ZTNJ1a+s/GGT8e1WOFhXtu/cL8UY 22KM02OQSp8HHtC1ooVM8JHUCR6PFpUB9RDxQ= MIME-Version: 1.0 Received: by 10.52.166.165 with SMTP id zh5mr1666878vdb.158.1309381549295; Wed, 29 Jun 2011 14:05:49 -0700 (PDT) Received: by 10.52.183.104 with HTTP; Wed, 29 Jun 2011 14:05:49 -0700 (PDT) In-Reply-To: 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 18:05:49 -0300 Message-ID: To: Paul Dragoonis Cc: =?ISO-8859-1?Q?David_Z=FClke?= , Ralph Schindler , internals , Dmitry Stogov Content-Type: multipart/alternative; boundary=bcaec53f8d851f099004a6e026e0 Subject: Re: [PHP-DEV] Fix for #53727 (is_subclass_of resolution with interfaces) From: martinscotta@gmail.com (Martin Scotta) --bcaec53f8d851f099004a6e026e0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Wed, Jun 29, 2011 at 5:25 PM, Paul Dragoonis wrote= : > 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 > wrote: > >>> Correct. > >>> > >>> I was hasty in that example, the first was copied & tested (and is > reflected > >>> 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 instance= s. > > > > 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. > > are you kidding, right? $class =3D 'stdClass'; $instance =3D new $class; var_dump( $instance instanceof $class ); > > > David > > > > > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --bcaec53f8d851f099004a6e026e0--