Closed
Description
Description
Child's private
method is shown with overwrites A
annotation, which is misleading https://3v4l.org/dm3Y9
<?php
class A
{
private function privateMethod() {}
}
class C extends A {
private function privateMethod() {}
private function otherMethod() {}
}
$class = new ReflectionClass('C');
echo (string)$class->getMethod('privateMethod');
echo (string)$class->getMethod('otherMethod');
Resulted in this output:
Method [ <user, overwrites A> private method privateMethod ] {
@@ /in/dm3Y9 7 - 7
}
Method [ <user> private method otherMethod ] {
@@ /in/dm3Y9 8 - 8
}
But I expected this output instead:
Method [ <user> private method privateMethod ] {
@@ /in/dm3Y9 7 - 7
}
Method [ <user> private method otherMethod ] {
@@ /in/dm3Y9 8 - 8
}
/cc @damianwadley
PHP Version
8.0 - 8.2
Operating System
No response