src/includes/classes/Core/Utils/Serializer.php
public function isSerialized($value): bool
    {
        if (!$value) {
            return false;
        } elseif (!is_string($value)) {
            return false;
        }
        $string = $value; // It is a string.

        if ('N;' === $string) {
            return true; // `null`.
        } elseif ('b:0;' === $string) {
            return true; // (bool)`false`.
        } elseif ('b:1;' === $string) {
            return true; // (bool)`true`.
        }
        if (mb_strpos($string, $this::CLOSURE) === 0) {
            $string = mb_substr($string, mb_strlen($this::CLOSURE));
        }
        if (!isset($string[3])) {
            return false;
        } elseif ($string[1] !== ':') {
            return false;
        } elseif (!in_array($string[0], [/* 'N', 'b', */ 'i', 'd', 's', 'a', 'O', 'C'], true)) {
            return false; // NOTE: Null and bool already tested above.
        } elseif (!in_array(mb_substr($string, -1), [';', '}'], true)) {
            return false;
        }
        switch ($string[0]) {
            case 'N': // Null.
            case 'b': // Boolean.
                return false; // For clarity.
                // NOTE: Null and bool already tested above.

            case 'i': // Integer.
                return (bool) preg_match('/^i\:\-?[0-9]+;$/u', $string);

            case 'd': // Float (decimal).
                return (bool) preg_match('/^d\:\-?[0-9.Ee+\-]+;$/u', $string);

            case 's': // String.
                return (bool) preg_match('/^s\:[0-9]+\:".*?";$/us', $string);

            case 'a': // An array.
                return (bool) preg_match('/^a\:[0-9]+\:\{.*?\}$/us', $string);

            case 'O': // An object.
            case 'C': // A serializable class.
                return (bool) preg_match('/^[OC]\:[0-9]+\:".*?"\:[0-9]+\:\{.*?\}$/us', $string);

            default: // Default case handler.
                return false; // Nope.
        }
    }
public function isSerialized($value): bool
    {
        if (!$value) {
            return false;
        } elseif (!is_string($value)) {
            return false;
        }
        $string = $value; // It is a string.

        if ('N;' === $string) {
            return true; // `null`.
        } elseif ('b:0;' === $string) {
            return true; // (bool)`false`.
        } elseif ('b:1;' === $string) {
            return true; // (bool)`true`.
        }
        if (mb_strpos($string, $this::CLOSURE) === 0) {
            $string = mb_substr($string, mb_strlen($this::CLOSURE));
        }
        if (!isset($string[3])) {
            return false;
        } elseif ($string[1] !== ':') {
            return false;
        } elseif (!in_array($string[0], [/* 'N', 'b', */ 'i', 'd', 's', 'a', 'O', 'C'], true)) {
            return false; // NOTE: Null and bool already tested above.
        } elseif (!in_array(mb_substr($string, -1), [';', '}'], true)) {
            return false;
        }
        switch ($string[0]) {
            case 'N': // Null.
            case 'b': // Boolean.
                return false; // For clarity.
                // NOTE: Null and bool already tested above.

            case 'i': // Integer.
                return (bool) preg_match('/^i\:\-?[0-9]+;$/u', $string);

            case 'd': // Float (decimal).
                return (bool) preg_match('/^d\:\-?[0-9.Ee+\-]+;$/u', $string);

            case 's': // String.
                return (bool) preg_match('/^s\:[0-9]+\:".*?";$/us', $string);

            case 'a': // An array.
                return (bool) preg_match('/^a\:[0-9]+\:\{.*?\}$/us', $string);

            case 'O': // An object.
            case 'C': // A serializable class.
                return (bool) preg_match('/^[OC]\:[0-9]+\:".*?"\:[0-9]+\:\{.*?\}$/us', $string);

            default: // Default case handler.
                return false; // Nope.
        }
    }
Is serialized?

@since 160712 Serializer.

@param mixed $value Value.

@return bool True if serialized.