1--TEST--
2#[\Override]: No parent class, but child implements matching interface.
3--FILE--
4<?php
5
6interface I {
7    public function i(): void;
8}
9
10class P {
11    #[\Override]
12    public function i(): void {}
13}
14
15class C extends P implements I {}
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