> > $pseudoWeakMap = array(); > $pseudoWeakMap[spl_object_**hash($obj)] = new WeakReference($obj); > > or did I misunderstand the concept? I hope I'll have a chance to use > WeakReferences soon in my project;)
I also believe that this is the logic, but from the doc, when an object is destroyed, its hash may be reused for other objects. So this implementation could possibly have bad side effect, isn't it ? Nicolas