mirror of
https://github.com/php/php-src.git
synced 2024-12-19 15:00:15 +08:00
15 lines
234 B
PHP
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
|