Tag: WeakReference

  • Hacking PHP’s WeakMap for Value Object D×

    Hacking PHP’s WeakMap for Value Object D×

    This guide will allow you to use value objects in PHP without a special$obj->equals() method. Instead, you can use the=== or == operator to compare two value objects. This guide will also show you how to use a WeakMap to ensure that you don’tcreate multiple instances of the same value object and how to hack…