3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace V1 { interface Foo { public function merge(Foo $foo); } } namespace V2 { interface Foo extends \V1\Foo { } } namespace { use V2\Foo; // use V1\Foo; class FooImpl implements Foo { public function merge(Foo $foo) { // ... } } $fooImpl1 = new FooImpl; $fooImpl2 = new FooImpl; $fooImpl1->merge($fooImpl2); }
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Declaration of FooImpl::merge(V2\Foo $foo) must be compatible with V1\Foo::merge(V1\Foo $foo) in /in/I2gkY on line 22
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:
38.92 ms | 401 KiB | 8 Q