public function isSerialized()
    {
        // if it isn't a string, it isn't serialized
        if (!is_string($this->serialized)) {
            return false;
        }
        $this->serialized = trim($this->serialized);
        if ('N;' == $this->serialized) {
            return true;
        }
        $length = strlen($this->serialized);
        if ($length < 4) {
            return false;
        }
        if (':' !== $this->serialized[1]) {
            return false;
        }
        $lastc = $this->serialized[$length - 1];
        if (';' !== $lastc && '}' !== $lastc) {
            return false;
        }
        $token = $this->serialized[0];
        switch ($token) {
            case 's' :
                if ('"' !== $this->serialized[$length - 2]) {
                    return false;
                }
            case 'a' :
            case 'O' :
                return (bool)preg_match("/^{$token}:[0-9]+:/s", $this->serialized);
            case 'b' :
            case 'i' :
            case 'd' :
                return (bool)preg_match("/^{$token}:[0-9.E-]+;\$/", $this->serialized);
        }
        return false;
    }