Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:31997 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38744 invoked by uid 1010); 31 Aug 2007 12:36:32 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 38729 invoked from network); 31 Aug 2007 12:36:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Aug 2007 12:36:32 -0000 Authentication-Results: pb1.pair.com smtp.mail=antony@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=antony@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: antony@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from [212.25.124.162] ([212.25.124.162:64571] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 49/A2-22642-E4B08D64 for ; Fri, 31 Aug 2007 08:36:32 -0400 Received: (qmail 7014 invoked from network); 31 Aug 2007 12:36:27 -0000 Received: from internal.zend.office (HELO ?127.0.0.1?) (10.1.1.1) by internal.zend.office with SMTP; 31 Aug 2007 12:36:27 -0000 Message-ID: <46D80B41.1060306@zend.com> Date: Fri, 31 Aug 2007 16:36:17 +0400 User-Agent: Thunderbird 2.0.0.6 (X11/20070801) MIME-Version: 1.0 To: php-dev References: <46D6BE5F.8060900@zend.com> In-Reply-To: <46D6BE5F.8060900@zend.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [PATCH] disallow arguments by ref in magic methods From: antony@zend.com (Antony Dovgal) Committed. On 30.08.2007 16:55, Antony Dovgal wrote: > Hello. > > I'd like to commit these two patches (for HEAD and 5_2 appropriately). > The patches disallow declaring any magic methods as accepting arguments by ref (which makes no sense anyway). > > Example: > class test { > function __set(&$name, $val) { } > } > > $t = new test; > $name = "prop"; > $t->$name = 1; > ?> > > Expected result of this code is: > Fatal error: Method test::__set() cannot take arguments by reference in %s on line %d > > > The diffs: > http://dev.daylessday.org/diff/magic_by_ref_5_2.diff > http://dev.daylessday.org/diff/magic_by_ref_HEAD.diff > > If there are no objections, I'm going to commit them later in the evening. > -- Wbr, Antony Dovgal