note 32970 added to function.unserialize

From: Date: Thu, 12 Jun 2003 12:55:56 +0000
Subject: note 32970 added to function.unserialize
Groups: php.notes 
Request: Send a blank email to php-notes+get-50224@lists.php.net to get a copy of this message
Notice this part from the documentation for unserialize(): "In the case the passed string is not unserializeable, FALSE is returned." Thinking of it that way, this example can show a problem with booleans: $mybool = false; $serialized = serialize($mybool); $unserialized = unserialize($serialized); Looks innocent enough; however, considering this function returns false on failure, does that mean that the value that was serialized was false, or the function itself failed? From what I can tell, there's no way to determine what really happened (this is where Java-style exceptions can come in handy). ---- Manual Page -- http://www.php.net/manual/en/function.unserialize.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+32970 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+32970&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+32970&report=yes

« previous php.notes (#50224) next »