note 64261 added to function.serialize

From: Date: Tue, 11 Apr 2006 03:02:10 +0000
Subject: note 64261 added to function.serialize
Groups: php.notes 
Request: Send a blank email to php-notes+get-107736@lists.php.net to get a copy of this message
I wanted a function to check if a string was serialized before doing anything to the string so i created one. <?php function is_serialized ( $var ) { return intval ( unserialize ( $var ) ) ; } ?> the function will return 1 if the string was serialized and 0 if it wasnt. ---- 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/64261 Del: integrated -- http://master.php.net/note/delete/64261/integrated Del: useless -- http://master.php.net/note/delete/64261/useless Del: bad code -- http://master.php.net/note/delete/64261/bad+code Del: spam -- http://master.php.net/note/delete/64261/spam Del: non-english -- http://master.php.net/note/delete/64261/non-english Del: in docs -- http://master.php.net/note/delete/64261/in+docs Del: other reasons-- http://master.php.net/note/delete/64261 Reject -- http://master.php.net/note/reject/64261 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#107736) next »