[prev in list] [next in list] [prev in thread] [next in thread]
List: php-internals
Subject: [PHP-DEV] Adding \Closure::isBindable()
From: Julien Pauli <jpauli () php ! net>
Date: 2013-07-31 13:13:54
Message-ID: CAMUwpuTLhn1ayipA0GFEBt2d0f=-u=4wX9Ppt_ha7_dy7EG6UA () mail ! gmail ! com
[Download RAW message or body]
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic