Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53680 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85016 invoked from network); 29 Jun 2011 21:05:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jun 2011 21:05:16 -0000 Authentication-Results: pb1.pair.com header.from=kontakt@beberlei.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=kontakt@beberlei.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain beberlei.de from 178.77.98.152 cause and error) X-PHP-List-Original-Sender: kontakt@beberlei.de X-Host-Fingerprint: 178.77.98.152 lvps178-77-98-152.dedicated.hosteurope.de Linux 2.6 Received: from [178.77.98.152] ([178.77.98.152:41253] helo=beberlei.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6D/61-10518-9839B0E4 for ; Wed, 29 Jun 2011 17:05:14 -0400 Received: from benny-pc (koln-5d816d1c.pool.mediaWays.net [93.129.109.28]) by beberlei.de (Postfix) with ESMTPSA id 37A0E1B74001 for ; Wed, 29 Jun 2011 23:05:10 +0200 (CEST) Date: Wed, 29 Jun 2011 23:00:52 +0200 To: internals@lists.php.net Message-ID: <20110629230052.5b75bdb5@benny-pc> 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> X-Mailer: Claws Mail 3.7.8 (GTK+ 2.24.4; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Fix for #53727 (is_subclass_of resolution with interfaces) From: kontakt@beberlei.de (Benjamin Eberlei) On Wed, 29 Jun 2011 22:22:54 +0200 David Z=C3=BClke wrote: > On 29.06.2011, at 22:20, Paul Dragoonis wrote: >=20 > > On Wed, Jun 29, 2011 at 8:49 PM, Ralph Schindler = wrote: > >> Correct. > >>=20 > >> I was hasty in that example, the first was copied & tested (and is ref= lected > >> in the test, as is that variation of what I wrote up.) > >>=20 > >> Either way, test and patch work in 5_3. > >=20 > > Doesn't this functionality confuse matters? > >=20 > > 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? > >=20 > > I thought instanceof was for parent classes + interfaces.. and > > is_subclass_of() was just for parent classes. >=20 > instanceof is a language construct and only operates on object instances. >=20 > David >=20 >=20 plus there is a difference if $a is a User is_subclass_of($a, 'User') retur= ns false, $a instanceof User returns true.