Hi all. >From a recent discussion, we noticed that there is no easy user-level way to know if a given closure is bindable or not.
Sure, the debatte about https://bugs.php.net/bug.php?id=64761 is still open, I dont see why a static closure is not bindable, knowing that a global scope defined closure is, and it can contain $this. I'm feeling like there is a non sense in this design, but anyway. To prevent such code : https://github.com/atoum/atoum/blob/master/classes/test/adapter/invoker.php#L191 , I added \closure::isbindable(). It's at https://github.com/jpauli/php-src/compare/static-closures , if you have thoughts ? Julien.Pauli