3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php error_reporting(0); class A { public function foo() { static::bar(); } public function bar() { echo "A::bar"; } } class B { public function something() { A::foo(); } public function bar() { echo "B::bar"; } } $b = new B; $b->something();
based on eR9d9
Output for 7.0.0 - 7.2.0
A::bar
Output for 5.3.18 - 5.6.28
B::bar