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