1

I want to implement a mechanism, when I set a closure inside class's property, and I'll use this closure later to setup header content. enter image description here

Is there a way to implement such behavior?

Gleb Kalachev
  • 123
  • 1
  • 7
  • 1
    Actual code, not pictures of code please. – Jay Blanchard Mar 01 '19 at 14:09
  • you could do this by using a static method to declare your closure of the static variable like `public static function init(){self::$coucou = function() {echo 'coucou';};}` and call it that way `test::init();` `(test::$coucou)();`. By the way i do not understant the relation with the question of Gled and the post of the duplicate link, but i surely don't get something. So I can't answer anymore – Frankich Mar 01 '19 at 14:30

0 Answers0