3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface A { public function foo(); } interface B extends A { public function bar(); } interface C { public function exec(A $obj); } class TestB implements B {  public function bar() { echo 'bar';} public function foo() { echo 'foo';} } class Test implements C { public function exec(A $obj) { $obj->foo(); } } class TestD extends Test { public function exec(B $obj) { $obj->foo(); } } $testB = new TestB; $test = new TestD; $test->exec($testB);
Output for git.master, git.master_jit
Parse error: syntax error, unexpected character 0x1D, expecting "function" or "const" in /in/ZHkLc on line 16
Process exited with code 255.
Output for rfc.property-hooks
Parse error: syntax error, unexpected character 0x1D, expecting "function" in /in/ZHkLc on line 16
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:
55.51 ms | 401 KiB | 8 Q