Closed shoghicp closed 8 years ago
I hope I will be able to port it to php7 before it is released. However, I'm still not sure whether the implementation is doable for php7. It might be impossible or very different from the way it is currently implemented.
Alright, thank you!
I'm also interested in this, I really wish PHP7 supported weak references by default.
PHP7.0.1 is out , would weakref support php7?
Will weakref support php7? I am looking forward to it...
I made weak references implementation for PHP 7 as a php-weak extension, which adds Weak\Reference
class and few functions. For weakref' WeakMap
, there are Weak\SplObjectStorage
provided by php-weak-lib library.
In general php-weak provides minimal bindings to PHP internals to allow building any kind of weak data structures in native PHP.
Note that Weak\Reference
from php-weak has different API than WeakReference
from weakref: I use notify approach, whether weakref uses pool approach.
You can think about php-weak like python's weakref.ref mixed with Java's WeakReference.
PHP7 weakref support is coming soon, I should probably have a first RC by the end of today.
I've released a tentative release for PHP7:
http://pecl.php.net/package/Weakref/0.3.0
Due to the amount of changes, I cannot guarantee that it will work out of the box, feel free to try it out and please report bugs you notice.
Finally ! GreatJob
PS: Is there any possable to get a dll ?
If all goes well, a bot should compile it for windows directly on PECL.
You save the whole pocketmine world ! Thx alot
http://windows.php.net/downloads/pecl/releases/weakref/0.3.0/
I just released 0.3.1 with a small bugfix, DLLs for that one should be available shortly.
Very nice -- probably worth a link from the PHP5 readme as it firms up, since a lot of interested people will probably find their way through that route.
YOU SAVED US.
Hello!
I saw that you have a milestone for 0.3 - php7. Right now I'm trying to move to PHP7 and I would like some information about this extension being upgraded (and when it's happening!).
Thank you for developing this extension!