1--TEST-- 2Return type of parent is allowed in closure 3--FILE-- 4<?php 5 6class A {} 7class B extends A {} 8 9$c = function(parent $x): parent { return $x; }; 10var_dump($c->bindTo(null, 'B')(new A)); 11?> 12--EXPECTF-- 13object(A)#%d (0) { 14} 15