3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ClassA {} class ClassB extends ClassA { public function methodA(self $self, parent $parent) {} } $c = new ReflectionClass('ClassB'); $m = $c->getMethod('methodA'); $t1 = $m->getParameters()[0]->getType()->getName(); $t2 = $m->getParameters()[1]->getType()->getName(); var_dump($t1, $t2, (string) $m);

preferences:
23.43 ms | 404 KiB | 5 Q