3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php error_reporting(E_ALL); class Foo1 { function bar(){ echo 1;} } class Foo2 extends Foo1 { function bar(){ echo 2;} } class Foo3 extends Foo2 { function bar(){ Foo1::bar(); } } $obj = new Foo3(); $obj->bar();
Output for 4.3.0 - 7.1.0
1