- var_dump: documentation ( source)
<?php
class Foo
{
public function __construct(int $j)
{
}
}
class Bar extends Foo
{
public function __construct(string $j)
{
}
}
$ref = new \ReflectionClass(\Bar::class);
var_dump($ref->getMethod('__construct')->getPrototype()->getDeclaringClass()->getName());