0

I'm having a corner case where I'd like to put a closure in a class property array

class Foo {

    public $bar = array(
        'baz' => function(){},
    );

}

However, PHP does not seem to be happy with closure definitions in a class property context. Is there a way to overcome problem ?

superzamp
  • 501
  • 6
  • 17

0 Answers0