3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<? define ('Foo', 1); class Foo { public function foo() { return "foo"; } } class Bar { public function foo() { return "foo"; } } $a = [Foo, Bar]; $b = new $a[1]; echo $b->foo();
based on HfmDf