summaryrefslogtreecommitdiff
path: root/Zend/tests/this_as_lexical_var_error.phpt
blob: d0e0106daeef9238d7247565603ece314967640e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--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