summaryrefslogtreecommitdiff
path: root/Zend/tests/bug71737.phpt
blob: b44de8e78eb1f86e5d65cd9aa328c3d3961e6516 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--TEST--
Bug #71737: Memory leak in closure with parameter named $this
--FILE--
<?php

class Test {
    public function method() {
        return function($this) {};
    }
}

(new Test)->method()(new stdClass);

?>
--EXPECTF--
Fatal error: Cannot use $this as parameter in %s on line %d