Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:39788 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21103 invoked from network); 8 Aug 2008 23:59:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Aug 2008 23:59:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.198.236 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.198.236 rv-out-0506.google.com Received: from [209.85.198.236] ([209.85.198.236:58535] helo=rv-out-0506.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7A/63-02575-1DDDC984 for ; Fri, 08 Aug 2008 19:59:13 -0400 Received: by rv-out-0506.google.com with SMTP id g37so1248588rvb.23 for ; Fri, 08 Aug 2008 16:59:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=qZRl3tOr2Ucp8OoaMLnTqIZavn8PnQTqt2VJcOmMReg=; b=Bz1cEP2yR2KqHYrZEE4u7jRhYl9tDD3oDI8KsN3xCxcY9y2LZRLR/P792Tjcnb6mML clqnuqzPsHuqd4UPfV6HJqQPdFIcRMMlhhAfO4iZiRtRs4Ix3C7xe+m9Tha4BsdQ+Giz DryesIF3CasB6o99o0oEKo3hoXyzsQPQRvqsc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=rMNjL/sHSiicNqgJQBcC6xZctck7lir8rGxYLnWm5du3KEisiEw2kogzNsWeVB58vd K0iwBri6xRvjPPaYE8dq4/lFp96Ap+JqBrmwP9QaevaGhjWO1VsG+yYKAMydyPz6Eq2X nQ9VFvVk4uIVctSUwg8OOc8F8Mf3skxZAuTnc= Received: by 10.141.136.8 with SMTP id o8mr1759503rvn.278.1218239950733; Fri, 08 Aug 2008 16:59:10 -0700 (PDT) Received: by 10.141.185.2 with HTTP; Fri, 8 Aug 2008 16:59:10 -0700 (PDT) Message-ID: Date: Sat, 9 Aug 2008 01:59:10 +0200 To: "Stanislav Malyshev" Cc: "Marcus Boerger" , "PHP Internals" In-Reply-To: <489CDBC9.30601@zend.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <489CAD75.2060404@zend.com> <1961502655.20080809000521@marcus-boerger.de> <489CC5BD.4060701@zend.com> <221319091.20080809002725@marcus-boerger.de> <489CCB62.8010406@zend.com> <122515992.20080809010008@marcus-boerger.de> <489CDBC9.30601@zend.com> Subject: Re: [PHP-DEV] by-ref return & inheritance From: pierre.php@gmail.com ("Pierre Joye") hi! On Sat, Aug 9, 2008 at 1:50 AM, Stanislav Malyshev wrote: > Hi! > >> I know that we don't like to add new magic methods, but this case >> seems to require new ones. What's about __getByRef (and its setter >> equivalent if it is also not supported yet)? > > Why would we need that? We already have perfectly good __get, which can > perfectly return by-ref. The question is only if we allow override __get > that was declared by-val with __get that is declared by-ref. I'm not sure to like the idea. I'm not a fan of OO strictness but I'd to agree with Marcus, I do not expect a reference from an overrided __get. There is also the problem with internal classes, if I'm not mistaken. > As for __set, __set doesn't return anything at all, so it's not very > relevant anyway. I meant set by reference. Is it not the same problem? class foo {function __set($key, &$value) {}} >> fatal error Cheers, -- Pierre http://blog.thepimp.net | http://www.libgd.org