1--TEST--
2Test that a notice is emitted when the return type/value of the overriding method is incompatible with the tentative return type/value of the overridden method
3--FILE--
4<?php
5class MyDateTimeZone extends DateTimeZone
6{
7    public static function listIdentifiers(int $timezoneGroup = DateTimeZone::ALL, ?string $countryCode = null): string
8    {
9        return "";
10    }
11}
12
13var_dump(MyDateTimeZone::listIdentifiers());
14?>
15--EXPECTF--
16Deprecated: Return type of MyDateTimeZone::listIdentifiers(int $timezoneGroup = DateTimeZone::ALL, ?string $countryCode = null): string should either be compatible with DateTimeZone::listIdentifiers(int $timezoneGroup = DateTimeZone::ALL, ?string $countryCode = null): array, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in %s on line %d
17string(0) ""
18