> I don't understand how the code you just gave would be useful in practice?
>
Is that question for me ? If yes, which code are you talking about ?
I've implemented a WeakMap class in the weakref pecl ext, see:
>
For ref: https://github.com/colder/php-weakref/blob/master/tests/weakmap_001.phpt
I believe this better fit people's needs. Or did you have something else in
> mind?
Talking for me, that's cool !
Just one question about the interface :
Javascript interface is based on a setter/getter rather than any kind of
ArrayAccess.
Does anybody has an idea if on this case, about ArrayAccess vs setter/getter
?
For example, wouldn't people expect "foreach" to work when $wm[] access is
possible ?
Personally, I like the current syntax, it's short. I'm just wondering of any
corner case exists?
Nicolas