3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Bar{} class Foo { function bar(Bar $bar) { } } $r = new ReflectionMethod(new Foo(), 'bar'); $parameters = $r->getParameters(); $parameters[0]->getType();
Output for 7.0.0 - 7.2.0
Output for 5.3.21 - 5.6.28
Fatal error: Call to undefined method ReflectionParameter::getType() in /in/N9r9t on line 16
Process exited with code 255.