php-src/Zend/tests/this_as_lexical_var_error.phpt

15 lines
234 B
Plaintext
Raw Normal View History

2014-09-23 19:36:45 +00:00
--TEST--
Cannot use $this as lexical variable
--FILE--
<?php
class Foo {
public function fn() {
return function() use ($this) {};
}
}
?>
--EXPECTF--
Fatal error: Cannot use $this as lexical variable in %s on line %d