note 63670 added to function.serialize
| From: | webmaster at tmproductionz dot com | Date: | Tue, 28 Mar 2006 06:06:33 +0000 |
| Subject: | note 63670 added to function.serialize | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-106800@lists.php.net to get a copy of this message | ||
<?php
function is_serialized ( $var ) {
return intval ( unserialize ( $var ) ) ;
}
?>
will return 0 if the string cannot be unserialized, 1 if it can.
usefull for checking if the string indeed is serialized.
----
Server IP: 64.71.164.2
Probable Submitter: 71.103.11.131
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.serialize.php
Edit -- http://master.php.net/note/edit/63670
Del: integrated -- http://master.php.net/note/delete/63670/integrated
Del: useless -- http://master.php.net/note/delete/63670/useless
Del: bad code -- http://master.php.net/note/delete/63670/bad+code
Del: spam -- http://master.php.net/note/delete/63670/spam
Del: non-english -- http://master.php.net/note/delete/63670/non-english
Del: in docs -- http://master.php.net/note/delete/63670/in+docs
Del: other reasons-- http://master.php.net/note/delete/63670
Reject -- http://master.php.net/note/reject/63670
Search -- http://master.php.net/manage/user-notes.php