[RFC][Accepted] weakrefs

php.internals

Joe Watkins

7 years ago
Morning internals, The vote for weakrefs is closed and has been accepted. Because of feedback received very late during voting from non-voting contributors/community members, the implementation will be slightly different to that in the RFC - it was pointed out that it's more useful if there is only one weakref for every object, and it happens to simplify the internal implementation also. The only difference is the __construct will be replaced with a named constructor so that we may achieve this: It will still have the same interface as accepted, but with a different name for constructor and simpler implementation. Cheers Joe

Christoph Becker

7 years ago
On 08.03.2019 at 07:34, Joe Watkins wrote:
> The vote for weakrefs is closed and has been accepted. > > Because of feedback received very late during voting from non-voting > contributors/community members, the implementation will be slightly > different to that in the RFC - it was pointed out that it's more useful if > there is only one weakref for every object, and it happens to simplify the > internal implementation also. The only difference is the __construct will > be replaced with a named constructor so that we may achieve this: It will > still have the same interface as accepted, but with a different name for > constructor and simpler implementation.
I just noticed that the constructor is still public[1]; shouldn't it be private instead? [1] <https://github.com/php/php-src/blob/5de750f41c1ee3ed834ebf4f811ba03a6cc2d9bc/Zend/zend_weakrefs.c#L183>
-- Christoph M. Becker