3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php abstract class A { abstract function foo(); public function callingD() { D::doSomething([$this, 'foo']); } } class B extends A { function foo() { echo 'yayff'; } } class D { public static function doSomething(callable $fun) { $fun(); } } $obj = new B; $obj->callingD();
based on V9kdG
Output for 5.5.0 - 7.3.0rc3
yayff