3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php interface IFoo { public function bar(); } class Foo { public function bar() { echo 'hier'; } } class FooAdapter implements IFoo { protected $foo; public function __construct() { $this->foo = new Foo(); } public function bar() { $this->foo->bar(); } } $foo = new FooAdapter(); $foo->bar();
Output for 5.2.15 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
hier