Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:57263 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99006 invoked from network); 7 Jan 2012 09:34:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Jan 2012 09:34:44 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 67.192.241.143 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.143 smtp143.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.143] ([67.192.241.143:42986] helo=smtp143.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id ED/01-25923-3B1180F4 for ; Sat, 07 Jan 2012 04:34:44 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp4.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id AAE803A065B; Sat, 7 Jan 2012 04:34:40 -0500 (EST) X-Virus-Scanned: OK Received: by smtp4.relay.dfw1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 639693A066C; Sat, 7 Jan 2012 04:34:40 -0500 (EST) Message-ID: <4F0811AF.5090603@sugarcrm.com> Date: Sat, 07 Jan 2012 01:34:39 -0800 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: "internals@lists.php.net" CC: Sebastian Bergmann References: <4F0810E7.2050904@php.net> In-Reply-To: <4F0810E7.2050904@php.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] "Cannot use $this as lexical variable" message still in PHP 5.4 From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > is still in zend_compile.c. IIRC, this code was added in PHP 5.3 to > prevent $this from being used as a lexical variable. It should no > longer be required in PHP 5.4. Right? Why you need to add $this there? $this should be available automatically IIRC unless you make the closure static. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227