Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53693 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 50649 invoked from network); 30 Jun 2011 05:01:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Jun 2011 05:01:28 -0000 Authentication-Results: pb1.pair.com header.from=mjpelmear@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=mjpelmear@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.42 as permitted sender) X-PHP-List-Original-Sender: mjpelmear@gmail.com X-Host-Fingerprint: 209.85.214.42 mail-bw0-f42.google.com Received: from [209.85.214.42] ([209.85.214.42:36050] helo=mail-bw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8A/6A-10518-6230C0E4 for ; Thu, 30 Jun 2011 01:01:28 -0400 Received: by bwa19 with SMTP id 19so1765773bwa.29 for ; Wed, 29 Jun 2011 22:01:24 -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 :content-type; bh=3F2xMWHy1hb6vWWFEMA6iM6tPhKdBp/VpUpELFL0Gmw=; b=sJoHiBh/Rfi+t7eScmMefXQauE+Syz8SEQcQsaEdePVN3tXzUABF8w3lh67KWUAaEK OcKq9iwzfdiFXu5mpzSf69jpfPuHDnn6E+XKL0dWQzxofreDvJz90h6VGHKxKB6opkZf IjWpjUI6puuLzkwHLj5/rbyXfmaSPhZaPc+DA= MIME-Version: 1.0 Received: by 10.204.233.15 with SMTP id jw15mr1469007bkb.48.1309410084146; Wed, 29 Jun 2011 22:01:24 -0700 (PDT) Received: by 10.204.40.198 with HTTP; Wed, 29 Jun 2011 22:01:24 -0700 (PDT) Received: by 10.204.40.198 with HTTP; Wed, 29 Jun 2011 22:01:24 -0700 (PDT) In-Reply-To: <4E0BFF40.4060101@gmail.com> References: <4E0B7F82.5080006@smashlabs.com> <2297BE5C-4B5F-4C16-9624-4137B63329FD@bitextender.com> <4E0B81D4.3080205@smashlabs.com> <4E0B9826.8050604@smashlabs.com> <4E0BFF40.4060101@gmail.com> Date: Thu, 30 Jun 2011 01:01:24 -0400 Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary=485b3979db46ee4cb604a6e6ca4b Subject: Re: [PHP-DEV] Fix for #53727 (is_subclass_of resolution with interfaces) From: mjpelmear@gmail.com (Matt Pelmear) --485b3979db46ee4cb604a6e6ca4b Content-Type: text/plain; charset=ISO-8859-1 Not like class_implements(), since that requires processing the returned array... Rather something that would function similarly to is_subclass_of() (in that it returns a bool, not an array), but for interfaces. I seem to run into a need for that on a fairly regular basis. (when I first found class_implements() this is what I thought it did before reading the docs) -matt On Jun 30, 2011 12:46 AM, "David Muir" wrote: > On 30/06/11 11:13, Matt Pelmear wrote: >> Seems odd to me that is_subclass_of returns true for interfaces... I never >> realized that before. >> >> Personally I would prefer a separate method to check for interfaces, since >> they aren't really classes (at least in my head), but I suppose that would >> break BC. (I've always wanted a method for checking if a class implements an >> interface.) >> So, maybe this patch makes sense to me, and some additional method for >> checking only interfaces would be nice? (I can't think of a good name for >> such a method.) Thoughts? >> >> -Matt >> On Jun 29, 2011 5:26 PM, "Ralph Schindler" wrote: >> > > As in class_implements() (shown in Ralph's example)? > > David > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > --485b3979db46ee4cb604a6e6ca4b--