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);
Output for git.master, git.master_jit, rfc.property-hooks
string(4) "self" string(6) "parent" string(181) "Method [ <user> public method methodA ] { @@ /in/CDgSk 7 - 7 - Parameters [2] { Parameter #0 [ <required> self $self ] Parameter #1 [ <required> parent $parent ] } } "

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
27.46 ms | 405 KiB | 5 Q