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
If you have not need to write any cooperative multi-tasking type operations since PHP8, such as thread pools or anything where you need fine grained control over async operations, you probably haven’t needed to consider the Fibers feature & Fiber class.
Weakmap is a lot more common. Good for storing data against an object key, which is cleaned up when the object is destructed.