- var_dump: documentation ( source)
<?php
class A
{
private function a()
{
}
}
class B
{
private function a()
{
}
}
$method = new \ReflectionMethod('A', 'a');
var_dump($method->getClosure(new A()));
var_dump($method->getClosure(new B()));