Posted by Rik on 04/25/07 16:41
mosesdinakaran@gmail.com wrote:
> Hi,
>
> Is there a way to check weather a variable contains serialized
> data or not, as we hve some functions like
> ( is_ double,is_ float) to check the integer and float value.
>
Very messy, but I have to admit I've used it:
function is_serialized($var){
$check = @unserialize($var);
return ($check===false && $var != serialize(false)) ? false : true;
}
--
Rik Wasmus
Estimated date being able to walk again: 01-05-2007.
Less then a week, hurray!
[Back to original message]
|