Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:57265 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14789 invoked from network); 7 Jan 2012 14:16:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Jan 2012 14:16:41 -0000 Authentication-Results: pb1.pair.com header.from=ekneuss@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ekneuss@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: ekneuss@gmail.com X-Host-Fingerprint: 209.85.214.42 mail-bk0-f42.google.com Received: from [209.85.214.42] ([209.85.214.42:42471] helo=mail-bk0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3B/50-10940-7C3580F4 for ; Sat, 07 Jan 2012 09:16:40 -0500 Received: by bkbzx1 with SMTP id zx1so708745bkb.29 for ; Sat, 07 Jan 2012 06:16:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=cUg+YlcVltLnASzVLh3tlr3f5onWzw0jKWY2/npmVKQ=; b=vL5GVOU+eEbU+aaH6dhBRCN6hK499Yafvu2CKeaJCvdwaHkmsiyA8m+65//vQojmI9 veYGKEpmMLa3NqfoZImAkfohUHlz5jflGOUSS26hqZX31Fq7nnbTizKp/XqdfzDbriW+ g0tWY88R8pQnnWfLdpQF9vaqqoQ4Tl6XbSyuE= MIME-Version: 1.0 Received: by 10.205.128.3 with SMTP id hc3mr4176805bkc.29.1325945796429; Sat, 07 Jan 2012 06:16:36 -0800 (PST) Sender: ekneuss@gmail.com Received: by 10.204.126.74 with HTTP; Sat, 7 Jan 2012 06:16:36 -0800 (PST) Received: by 10.204.126.74 with HTTP; Sat, 7 Jan 2012 06:16:36 -0800 (PST) In-Reply-To: <4F081300.6020909@php.net> References: <4F0810E7.2050904@php.net> <4F0811AF.5090603@sugarcrm.com> <4F081300.6020909@php.net> Date: Sat, 7 Jan 2012 15:16:36 +0100 X-Google-Sender-Auth: O9_g0Jz1GfN0EtcHoUSVb3m99hc Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary=000e0cdfc8363006c504b5f0d062 Subject: Re: [PHP-DEV] "Cannot use $this as lexical variable" message still in PHP 5.4 From: etienne.kneuss@epfl.ch (Etienne Kneuss) --000e0cdfc8363006c504b5f0d062 Content-Type: text/plain; charset=UTF-8 Hi, On Jan 7, 2012 10:41 AM, "Sebastian Bergmann" wrote: > > Am 07.01.2012 10:34, schrieb Stas Malyshev: > > Why you need to add $this there? $this should be available automatically > > IIRC unless you make the closure static. > > That is not the point I wanted to make. Explicitly listing $this in > use() should not trigger a compiler error, IMHO. To me it seems similar to assigning $this, only here it is via special closure syntax. Since this code is no longer necessary, and might conflict with the rebinding of $this, the error makes sense IMHO. > > I just wanted to make sure that it was not an oversight to not remove > the error message. > > -- > Sebastian Bergmann Co-Founder and Principal Consultant > http://sebastian-bergmann.de/ http://thePHP.cc/ > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > --000e0cdfc8363006c504b5f0d062--