3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Red { public static function b_func() { static::a_func(); } public static function a_func() { echo "Colour is ",__CLASS__."\n"; } } class Blue extends Red { public static function run() { Red::b_func(); parent ::b_func(); self::b_func(); } public static function a_func() { echo "Colour is ",__CLASS__."\n"; } } class Green extends Blue { public static function a_func() { echo "Colour is ",__CLASS__."\n"; } } Green::run(); ?>
based on oSuKa
Output for 5.6.38 - 7.3.0rc3
Colour is Red Colour is Green Colour is Green