3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Container {} interface RuleSetInterface {} class RuleSet implements RuleSetInterface {} class Foo { public function __construct(Container $app, RuleSetInterface $rules) { $this->app = $app; var_dump(is_null($rules)); var_dump($rules instanceof RuleSetInterface); exit(); $this->rules = $rules; } } $foo = new Foo(new Container());

preferences:
43.8 ms | 402 KiB | 5 Q