giordano-p
4/8/2015 - 5:43 PM

string_is_serialized

<?php

/*
 *------------------------------------------------------------------------------------------------
 * Determine if string is serialized
 *------------------------------------------------------------------------------------------------
 *
 */
function string_is_serialized($str)
{
    return (is_string($str)) ? preg_match( "/^(O:|a:)/", $str) : false;
}