protected static function checkBasic($data, $length): bool
    {
        return $length < 4 || $data[1] !== ':' || ($data[$length - 1] !== ';' && $data[$length - 1] !== '}');
    }
protected static function checkBasic($data, $length): bool
    {
        return $length < 4 || $data[1] !== ':' || ($data[$length - 1] !== ';' && $data[$length - 1] !== '}');
    }
protected static function checkBasic ( $ data , $ length ) : bool { return $ length < 4 || $ data [ 1 ] !== ':' || ( $ data [ $ length - 1 ] !== ';' && $ data [ $ length - 1 ] !== '}' ) ; }
Check some basic requirements of all serialized strings

@param string $data
@param int    $length
@return bool
Check some basic requirements of all serialized strings