1--TEST--
2Test that the notice can be suppressed 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
5
6class MyDateTime extends DateTime
7{
8    /**
9     * @return DateTime|false
10     */
11    #[ReturnTypeWillChange]
12    public function modify(string $modifier) {
13        return false;
14    }
15}
16
17$date = new MyDateTime("2021-01-01 00:00:00");
18var_dump($date->modify("+1 sec"));
19?>
20--EXPECT--
21bool(false)
22