Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42537 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98977 invoked from network); 8 Jan 2009 17:00:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Jan 2009 17:00:24 -0000 Authentication-Results: pb1.pair.com smtp.mail=rewbs.soal@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rewbs.soal@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.16 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: rewbs.soal@gmail.com X-Host-Fingerprint: 209.85.217.16 mail-gx0-f16.google.com Received: from [209.85.217.16] ([209.85.217.16:47077] helo=mail-gx0-f16.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C7/0F-23141-12136694 for ; Thu, 08 Jan 2009 12:00:19 -0500 Received: by gxk9 with SMTP id 9so947973gxk.0 for ; Thu, 08 Jan 2009 09:00:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=HomNZngqrMq056U3GB8wkYa/zTG+YvHkm/oqijbI/DI=; b=PdPD925TEOqzinszfEzdxdEbvl5jXrEGDL7YpIZVkXzJP8LudJxEBZfiS930HAgLfV D/zflUydaHme4Uyo2aFvbfefS81sD3vbVXrI121cNk87oAdmWW20BTRIW+CLTIhEmCNU XgDRcG82QkMF8Vh7WfL24tMgm8/4zbw2HTt04= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:to:subject:cc:in-reply-to :mime-version:content-type:content-transfer-encoding :content-disposition:references; b=M3GZM2jj/JgpKOonJKbQm7wdTU6/nzZJNQrwrrKiAqAFB1r+713AkCyUPpxabEL5nI JeTe7ucqtUKPq0s/WuJ21smplFIA26bD4tguG52KFYZTBcL7+2Cc+Sd6+hxOHha/twUa +EpXO+vR7CJgPVKW4OCPDYK/xICc7EGyMp0Ls= Received: by 10.150.11.14 with SMTP id 14mr2313517ybk.65.1231434006563; Thu, 08 Jan 2009 09:00:06 -0800 (PST) Received: by 10.151.75.11 with HTTP; Thu, 8 Jan 2009 09:00:06 -0800 (PST) Message-ID: <5a8807d10901080900w5d794c54gc67df2198e2237f7@mail.gmail.com> Date: Thu, 8 Jan 2009 17:00:06 +0000 Reply-To: robin@soal.org To: "PHP internals" Cc: "Andrei Zmievski" , "David Coallier" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4963D8AD.5090502@gravitonic.com> Subject: Re: [PHP-DEV] Private member/method access inconsistency From: rewbs.soal@gmail.com ("Robin Fernandes") 2009/1/6 David Coallier : >> call to __call() on private method invocation. The former approach presents >> more of a BC >> problem IMHO, so I am advocating the latter. I've attached a simple patch >> for consideration. >> > > I'd say go ahead, this sounds like common sense to be consistent in > both methods and members. > Cool, looks like this has gone in already. A couple of comments: 1. I think the change has not been made for callbacks (so callbacks now behave differently from normal method invocations). 2. Perhaps on 5_3 and HEAD, the equivalent change should be made for __callStatic()? Addressing those two points would make things even more consistent. I'm adding some testcases to illustrate. --TEST-- Trigger __call() in lieu of non visible methods when called via a callback. --FILE-- --EXPECTF-- In __call() for method none() In __call() for method prot() In __call() for method priv() --TEST-- Trigger __callStatic() in lieu of non visible methods when called directly or via a callback. --FILE-- --EXPECTF-- Using direct method invocation: In __callStatic() for method none() In __callStatic() for method prot() In __callStatic() for method priv() Using callbacks: In __callStatic() for method none() In __callStatic() for method prot() In __callStatic() for method priv()