--TEST-- GH-9470: ReflectionMethod constructor finds private parent method --FILE-- getMethod('publicMethod'); echo (string) $r->getMethod('protectedMethod'); echo (string) $r->getMethod('privateMethod'); ?> --EXPECTF-- Method [ public method publicMethod ] { @@ %s 5 - 5 } Method [ protected method protectedMethod ] { @@ %s 6 - 6 } Method [ private method privateMethod ] { @@ %s 7 - 7 } Method [ public method publicMethod ] { @@ %s 5 - 5 } Method [ protected method protectedMethod ] { @@ %s 6 - 6 } Method [ private method privateMethod ] { @@ %s 7 - 7 }