3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface ContainerInterface1 { public function get($id); } interface ContainerInterface2 { public function get($id, $params = [], $setters = [], $shared = true); } class Container implements ContainerInterface1, ContainerInterface2 { public function get($id, $params = [], $setters = [], $shared = true) { return $id; } } class Y { public function setContainer(ContainerInterface1 $value) { $this->value = $value; } } $container = new Container(); var_dump($container instanceof ContainerInterface1); var_dump($container instanceof ContainerInterface2); echo $container->get('hello'); $y = new Y(); $y->setContainer($container);
Output for git.master, git.master_jit, rfc.property-hooks
bool(true) bool(true) hello Deprecated: Creation of dynamic property Y::$value is deprecated in /in/bB0Oj on line 25

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:
29.85 ms | 405 KiB | 5 Q