3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public static function echoes($b) { echo $b->protectedFunction(); } } class B extends A { protected function protectedFunction() { return "this is protected"; } } class C { public static function echoes($b) { echo $b->protectedFunction(); } } $b = new B(); A::echoes($b); C::echoes($b);

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
154.95 ms | 2077 KiB | 10 Q