1--TEST-- 2Return type of self is allowed in closure 3--FILE-- 4<?php 5 6$c = function(): self { return $this; }; 7class Bar { } 8var_dump($c->call(new Bar)); 9--EXPECT-- 10object(Bar)#2 (0) { 11} 12