Molot Posted December 16, 2009 Share Posted December 16, 2009 Is there any function that would allow me to do sth like: $some_array = $array_from_other_place_in_code; $fingerprint = sha256sum_array($some_array); ? I mean sometimes I need fast, preferably binary fingerprint for caching purpose. It does not have to be perfectly always the same for the same array (if one array gives 2 - 3 fingerprints due to fast algorithm affected by memory garbage between its fields then so be it), it only have to be fast and different for different objects. Converting to string tends to be to slow, and i don't like recursion (but not always I know exact structure of the array - structured "were" is quite a tree). Link to comment https://forums.phpfreaks.com/topic/185345-fast-fingerprint-of-an-object-array/ Share on other sites More sharing options...
trq Posted December 16, 2009 Share Posted December 16, 2009 Best you'll find is probably serialize along with md5. Link to comment https://forums.phpfreaks.com/topic/185345-fast-fingerprint-of-an-object-array/#findComment-978442 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.