bug71737.phpt 287 B

12345678910111213141516
  1. --TEST--
  2. Bug #71737: Memory leak in closure with parameter named $this
  3. --FILE--
  4. <?php
  5. class Test {
  6. public function method() {
  7. return function($this) {};
  8. }
  9. }
  10. (new Test)->method()(new stdClass);
  11. ?>
  12. --EXPECTF--
  13. Fatal error: Cannot use $this as parameter in %s on line %d