php-src/Zend/tests/this_as_lexical_var_error.phpt
2014-09-24 12:06:19 +02:00

15 lines
234 B
PHP

--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