note 21992 added to function.md5

From: Date: Mon, 03 Jun 2002 05:01:42 +0000
Subject: note 21992 added to function.md5
Groups: php.notes 
Request: Send a blank email to php-notes+get-31368@lists.php.net to get a copy of this message
OOPS! md5(join('', get_object_vars($obj))) will return the word "Array" for any member that is an array, and likewise for object members. Not so smart after all! md5(serialize($obj)) is probably the best way to hash an object. (I stand self-corrected :) -- http://www.php.net/manual/en/function.md5.php http://master.php.net/manage/user-notes.php?action=edit+21992 http://master.php.net/manage/user-notes.php?action=delete+21992 http://master.php.net/manage/user-notes.php?action=reject+21992

« previous php.notes (#31368) next »