xref: /PHP-7.1/Zend/tests/bug71737.phpt (revision 77bb96d7)
1--TEST--
2Bug #71737: Memory leak in closure with parameter named $this
3--FILE--
4<?php
5
6class Test {
7    public function method() {
8        return function($this) {};
9    }
10}
11
12(new Test)->method()(new stdClass);
13
14?>
15--EXPECTF--
16Fatal error: Cannot use $this as parameter in %s on line %d
17