colder / php-weakref

PECL extension that implements weak references and weak maps in PHP
http://pecl.php.net/weakref
Other
36 stars 13 forks source link

PHP7 support #19

Closed shoghicp closed 8 years ago

shoghicp commented 9 years ago

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!

colder commented 9 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.

shoghicp commented 9 years ago

Alright, thank you!

DHager commented 8 years ago

I'm also interested in this, I really wish PHP7 supported weak references by default.

aodzip commented 8 years ago

PHP7.0.1 is out , would weakref support php7?

PeratX commented 8 years ago

Will weakref support php7? I am looking forward to it...

pinepain commented 8 years ago

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.

colder commented 8 years ago

PHP7 weakref support is coming soon, I should probably have a first RC by the end of today.

colder commented 8 years ago

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.

aodzip commented 8 years ago

Finally ! GreatJob

PS: Is there any possable to get a dll ?

colder commented 8 years ago

If all goes well, a bot should compile it for windows directly on PECL.

aodzip commented 8 years ago

You save the whole pocketmine world ! Thx alot

colder commented 8 years ago

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.

DHager commented 8 years ago

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.

legoboy0215 commented 8 years ago

YOU SAVED US.