diff --git a/setup/test/tests/class.php_analyze.php b/setup/test/tests/class.php_analyze.php index 53e0a85ab342851a322b102ecde9899a6361cee0..1ed22fe1a90dbac3303953f1ab01dbd9f53c866c 100644 --- a/setup/test/tests/class.php_analyze.php +++ b/setup/test/tests/class.php_analyze.php @@ -201,11 +201,10 @@ class SourceAnalyzer extends Test { // PHP does not automatically nest scopes. Variables // available inside the closure must be explictly defined. // Therefore, there is no need to pass the current scope. - // However, $this is not allowed inside inline functions - // unless declared in the use () parameters. + // As of PHP 5.4, $this is added to the closure automatically $this->traverseFunction( array($token[2], $function['file']), - array('allow_this'=>false)); + array('allow_this'=>true)); break; case T_STATIC: $c = current($this->tokens);