Re: Closure::call() to access private data, really ?
| From: | Andrea Faulds | Date: | Thu, 23 Apr 2015 04:08:34 +0000 |
| Subject: | Re: Closure::call() to access private data, really ? | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-85908@lists.php.net to get a copy of this message | ||
Hey Julien,
> On 22 Apr 2015, at 13:18, Julien Pauli <jpauli@php.net> wrote:
>
> Perhaps the best thing to do is to forbid rebinding a Closure to an internal class ?
>
> I'm sure we could find segfaulting behaviors using such a trick on most of our internals
> classes, aka mysqli, simplexmlelement, PDO or SPL classes.
>
> Thoughts ?
Sounds good to me! There’s already a precedent for having internal classes special with respect to
Closure binding, as you can’t bind a method of an internal class to an object not of that class.
Thanks.
--
Andrea Faulds
http://ajf.me/