<?php

class A
{
    public function publicMethod() {}
    protected function protectedMethod() {}
    private function privateMethod() {}
}
class B extends A {}

echo (string) new ReflectionMethod('B', 'publicMethod');
echo (string) new ReflectionMethod('B', 'protectedMethod');
echo (string) new ReflectionMethod('B', 'privateMethod');

$r = new ReflectionClass('B');
echo (string) $r->getMethod('publicMethod');
echo (string) $r->getMethod('protectedMethod');
echo (string) $r->getMethod('privateMethod');

?>