<?php class Base { public static function noClosure() { echo 'Context of '.get_called_class().', no closure: '; echo Left::$prot; echo "\n"; } public static function withClosure() { echo 'Context of '.get_called_class().', with closure: '; $cl = function(){ echo Left::$prot; echo "\n"; }; $cl(); } } class Left extends Base { protected static $prot = 'works.'; } class Right extends Base { } Base::noClosure(); Right::noClosure(); Base::withClosure(); Right::withClosure();
You have javascript disabled. You will not be able to edit any code.
Value for `_results` contains invalid data `array`