1--TEST-- 2Error recording in error handler 3--SKIPIF-- 4<?php 5if (getenv('SKIP_PRELOAD')) die('skip Error handler not active during preloading'); 6?> 7--FILE-- 8<?php 9set_error_handler(function($code, $msg) { 10 echo "Error: $msg\n"; 11 new class extends DateTime { 12 }; 13}); 14new class extends DateTime { 15 function getTimezone() {} 16}; 17?> 18--EXPECT-- 19Error: Return type of DateTime@anonymous::getTimezone() should either be compatible with DateTime::getTimezone(): DateTimeZone|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice 20