3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php use Selami\Foundation\App; use Psr\Logging\Logger; class MyClass { public function __construct(App $app, Logger $log) { } } $method = new ReflectionMethod(MyClass::class, '__construct'); $parameters = $method->getParameters(); var_dump($parameters; foreach($parameters as $param) { var_dump($param->getClass()->name); }
Output for 7.1.7
Parse error: syntax error, unexpected ';', expecting ',' or ')' in /in/HpIX0 on line 17
Process exited with code 255.