mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
20 lines
572 B
PHP
20 lines
572 B
PHP
--TEST--
|
|
Error recording in error handler
|
|
--SKIPIF--
|
|
<?php
|
|
if (getenv('SKIP_PRELOAD')) die('skip Error handler not active during preloading');
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
set_error_handler(function($code, $msg) {
|
|
echo "Error: $msg\n";
|
|
new class extends DateTime {
|
|
};
|
|
});
|
|
new class extends DateTime {
|
|
function getTimezone() {}
|
|
};
|
|
?>
|
|
--EXPECT--
|
|
Error: 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
|