1--TEST--
2#[\Override]: No parent class, but child implements matching interface (2).
3--FILE--
4<?php
5
6interface I {
7    public function i(): void;
8}
9
10class C extends P implements I {}
11
12class P {
13    #[\Override]
14    public function i(): void {}
15}
16
17echo "Done";
18
19?>
20--EXPECTF--
21Fatal error: P::i() has #[\Override] attribute, but no matching parent method exists in %s on line %d
22