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