Have you ever used PHP `WeakMap` or Fiber in your project?
TBH, I don't know about this just saw in the PHP doc..
www.php.net/manual/en/class.weakmap.php
www.php.net/manual/en/class.fiber.php
Have you ever used PHP `WeakMap` or Fiber in your project?
TBH, I don't know about this just saw in the PHP doc..
www.php.net/manual/en/class.weakmap.php
Fibres are something that you probably wouldn't ever use yourself. They're effectively there for framework authors, but end devs are unlikely to ever need to touch them.
WeakMap and WeakReference are more useful - they're a great way to hold onto things that you might want to let get garbage collected.