weakreference_bc

Polyfill of WeakMap/WeakReference for older PHP versions. This is a fork of the abandoned "weakref" PECL.


A weak reference provides a gateway to an object without preventing that object from being collected by the garbage collector (GC).

License: PHP

Latest releases

Version Release Download
0.4.1 2022-01-06 weakreference_bc-0.4.1.tgz
0.4.0 2022-01-06 weakreference_bc-0.4.0.tgz
Show all releases

Changelog

Version Message
0.4.1 - Fix windows build issues.
- Stop using the nonstandard `ulong` type.
- Fix typo in PECL conflicts section with weakref PECL.
- Change configure flag to enable/disable this extension to --enable-weakreference_bc
0.4.0 - Fork this from the abandoned "weakref" PECL to provide WeakMap for php 7.0-7.4 and WeakReference for php 7.0-7.3
- Fix compilation errors for WeakMap in php 7.4
- Rename WeakRef to WeakReference to act as a polyfill for WeakReference in php before php 7.4.
- Make WeakReference constructor throw and require the use of WeakReference::create, like php 7.4
- Fix edge cases when destructor of an old value modifies the weakmap during an update.
- Strictly prevent the creation of dynamic properties on a WeakReference.
Show complete changelog