static function smartUnserialize(string $data)
    {
        try {
            $value = @unserialize($data);
        } catch (\Throwable $e) {
            throw new DeserializationFailedException('An exception was thrown during unserialization', 0, $e);
        }

        // distinguish between "false on error" and a serialized FALSE value
        if ($value === false && $data !== self::getSerializedFalse()) {
            throw new DeserializationFailedException('Unserialization failed - data possibly malformed');
        }

        return $value;
    }
static function smartUnserialize(string $data)
    {
        try {
            $value = @unserialize($data);
        } catch (\Throwable $e) {
            throw new DeserializationFailedException('An exception was thrown during unserialization', 0, $e);
        }

        // distinguish between "false on error" and a serialized FALSE value
        if ($value === false && $data !== self::getSerializedFalse()) {
            throw new DeserializationFailedException('Unserialization failed - data possibly malformed');
        }

        return $value;
    }
static function smartUnserialize ( string $ data ) { try { $ value = @ unserialize ( $ data ) ; } catch ( \ Throwable $ e ) { throw new DeserializationFailedException ( 'An exception was thrown during unserialization' , 0 , $ e ) ; } // distinguish between "false on error" and a serialized FALSE value if ( $ value === false && $ data !== self :: getSerializedFalse ( ) ) { throw new DeserializationFailedException ( 'Unserialization failed - data possibly malformed' ) ; } return $ value ; }
Attempt to unserialize the given data and properly handle any error states

@throws DeserializationFailedException on failure
@return mixed
Attempt to unserialize the given data and properly handle any error states