php-src/Zend/tests/this_as_lexical_var_error.phpt
Nikita Popov f3e5bbe6f3 Implement arrow functions
Per RFC: https://wiki.php.net/rfc/arrow_functions_v2

Co-authored-by: Levi Morrison <levim@php.net>
Co-authored-by: Bob Weinand <bobwei9@hotmail.com>
2019-05-02 15:04:03 +02:00

15 lines
233 B
PHP

--TEST--
Cannot use $this as lexical variable
--FILE--
<?php
class Foo {
public function f() {
return function() use ($this) {};
}
}
?>
--EXPECTF--
Fatal error: Cannot use $this as lexical variable in %s on line %d