Re: "Cannot use $this as lexical variable" message still in PHP 5.4
| From: | Stas Malyshev | Date: | Sat, 07 Jan 2012 09:34:39 +0000 |
| Subject: | Re: "Cannot use $this as lexical variable" message still in PHP 5.4 | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-57263@lists.php.net to get a copy of this message | ||
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