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());
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught ArgumentCountError: Too few arguments to function Foo::__construct(), 1 passed in /in/vaqqK on line 22 and exactly 2 expected in /in/vaqqK:12 Stack trace: #0 /in/vaqqK(22): Foo->__construct(Object(Container)) #1 {main} thrown in /in/vaqqK on line 12
Process exited with code 255.

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:
49.95 ms | 401 KiB | 8 Q