3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface MyOwnInterface { public function getBar(); public function setBar($bar); } trait Foo { protected \DateTime $bar; public function getBar(): \DateTime { return $this->bar; } public function setBar(\DateTime $bar) { $this->bar = $bar; return $this; } } class MyClass implements MyOwnInterface { use Foo; }
Output for git.master_jit, git.master
Fatal error: Declaration of MyClass::setBar(DateTime $bar) must be compatible with MyOwnInterface::setBar($bar) in /in/q0qFe on line 19
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:
32.93 ms | 405 KiB | 5 Q