Closed Frago9876543210 closed 5 years ago
This is expected behaviour.
toArray
will attempt to create an associative array with the same keys as the map. It is not possible to use the hash value, because the hash and the key are not equal. For example, if three objects have the same hash but are not equal, all three should be in the map.
If you use objects as keys, toArray
will fail.
I think it should return array with
spl_object_hash($class) => value