<?php // Without patch (HEAD) class A { public static function hello() { return 'hello'; } public static function say() { return static::hello() . ' world'; } } class ASub extends A { public static function say() { return parent::say() . '!'; } } // With patch trait TestTrait { public static function hello() { return 'hello'; } } class B { use TestTrait; public static function say() { return static::hello() . ' world'; } } class BSub extends B { public static function say() { return parent::say() . '!'; } } var_dump(A::say()); var_dump(ASub::say()); var_dump(B::say()); var_dump(BSub::say());
You have javascript disabled. You will not be able to edit any code.