1--TEST-- 2Exception during delayed variance autoload (variation 2) 3--FILE-- 4<?php 5spl_autoload_register(function() { 6 class Y {} 7 throw new Exception; 8}); 9class A { 10 function method(): object {} 11} 12class B extends A { 13 function method(): Y {} 14} 15?> 16--EXPECTF-- 17Fatal error: During inheritance of B, while autoloading Y: Uncaught Exception in %s:%d 18Stack trace: 19#0 %s(%d): {closure:%s:%d}('Y') 20#1 {main} in %s on line %d 21