Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:57264 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1120 invoked from network); 7 Jan 2012 09:40:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Jan 2012 09:40:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=sebastian@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=sebastian@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 93.190.64.36 as permitted sender) X-PHP-List-Original-Sender: sebastian@php.net X-Host-Fingerprint: 93.190.64.36 mail-6.de-punkt.de Received: from [93.190.64.36] ([93.190.64.36:52688] helo=mail-6.de-punkt.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A1/81-25923-BF2180F4 for ; Sat, 07 Jan 2012 04:40:13 -0500 Received: (qmail 23612 invoked by uid 511); 7 Jan 2012 09:40:11 -0000 Received: by simscan 1.3.1 ppid: 23606, pid: 23610, t: 0.0299s scanners: attach: 1.4.0 Received: from unknown (HELO ?192.168.2.31?) (sb@sebastian-bergmann.de@93.214.184.205) by 0 with ESMTPA; 7 Jan 2012 09:40:11 -0000 Message-ID: <4F081300.6020909@php.net> Date: Sat, 07 Jan 2012 10:40:16 +0100 Reply-To: internals@lists.php.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: internals@lists.php.net References: <4F0810E7.2050904@php.net> <4F0811AF.5090603@sugarcrm.com> In-Reply-To: <4F0811AF.5090603@sugarcrm.com> X-Enigmail-Version: 1.3.4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] "Cannot use $this as lexical variable" message still in PHP 5.4 From: sebastian@php.net (Sebastian Bergmann) 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. 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/