src/Parser/ServerParse.php
public static function uCheck(string $stmt, int $offset, bool $has_Space = true)
    {
        if (strlen($stmt) > ++$offset) {
            switch ($stmt[$offset]) {
                case 'P':
                case 'p':
                    if (strlen($stmt) > $offset + 5) {
                        $c1 = $stmt[++$offset];
                        $c2 = $stmt[++$offset];
                        $c3 = $stmt[++$offset];
                        $c4 = $stmt[++$offset];
                        $c5 = $stmt[++$offset];
                        if (($c1 == 'D' || $c1 == 'd')
                            && ($c2 == 'A' || $c2 == 'a')
                            && ($c3 == 'T' || $c3 == 't')
                            && ($c4 == 'E' || $c4 == 'e')
                            && ($has_Space ? (' ' == $c5 || '\t' == $c5 || '\r' == $c5 || '\n' == $c5) : true)) {
                            return self::UPDATE;
                        }
                    }
                    break;
                case 'S':
                case 's':
                    if (strlen($stmt) > $offset + 2) {
                        $c1 = $stmt[++$offset];
                        $c2 = $stmt[++$offset];
                        if (($c1 == 'E' || $c1 == 'e')
                            && ($c2 == ' ' || $c2 == '\t' || $c2 == '\r' || $c2 == '\n')) {
                            return ($offset << 8) | self::USE;
                        }
                    }
                    break;
                case 'N':
                case 'n':
                    if (strlen($stmt) > $offset + 5) {
                        $c1 = $stmt[++$offset];
                        $c2 = $stmt[++$offset];
                        $c3 = $stmt[++$offset];
                        $c4 = $stmt[++$offset];
                        $c5 = $stmt[++$offset];
                        if (($c1 == 'L' || $c1 == 'l')
                            && ($c2 == 'O' || $c2 == 'o')
                            && ($c3 == 'C' || $c3 == 'c')
                            && ($c4 == 'K' || $c4 == 'k')
                            && ($c5 == ' ' || $c5 == '\t' || $c5 == '\r' || $c5 == '\n')) {
                            return self::UNLOCK;
                        }
                    }
                    break;
                default:
                    return self::OTHER;
            }
        }
        return self::OTHER;
    }
public static function uCheck(string $stmt, int $offset, bool $has_Space = true)
    {
        if (strlen($stmt) > ++$offset) {
            switch ($stmt[$offset]) {
                case 'P':
                case 'p':
                    if (strlen($stmt) > $offset + 5) {
                        $c1 = $stmt[++$offset];
                        $c2 = $stmt[++$offset];
                        $c3 = $stmt[++$offset];
                        $c4 = $stmt[++$offset];
                        $c5 = $stmt[++$offset];
                        if (($c1 == 'D' || $c1 == 'd')
                            && ($c2 == 'A' || $c2 == 'a')
                            && ($c3 == 'T' || $c3 == 't')
                            && ($c4 == 'E' || $c4 == 'e')
                            && ($has_Space ? (' ' == $c5 || '\t' == $c5 || '\r' == $c5 || '\n' == $c5) : true)) {
                            return self::UPDATE;
                        }
                    }
                    break;
                case 'S':
                case 's':
                    if (strlen($stmt) > $offset + 2) {
                        $c1 = $stmt[++$offset];
                        $c2 = $stmt[++$offset];
                        if (($c1 == 'E' || $c1 == 'e')
                            && ($c2 == ' ' || $c2 == '\t' || $c2 == '\r' || $c2 == '\n')) {
                            return ($offset << 8) | self::USE;
                        }
                    }
                    break;
                case 'N':
                case 'n':
                    if (strlen($stmt) > $offset + 5) {
                        $c1 = $stmt[++$offset];
                        $c2 = $stmt[++$offset];
                        $c3 = $stmt[++$offset];
                        $c4 = $stmt[++$offset];
                        $c5 = $stmt[++$offset];
                        if (($c1 == 'L' || $c1 == 'l')
                            && ($c2 == 'O' || $c2 == 'o')
                            && ($c3 == 'C' || $c3 == 'c')
                            && ($c4 == 'K' || $c4 == 'k')
                            && ($c5 == ' ' || $c5 == '\t' || $c5 == '\r' || $c5 == '\n')) {
                            return self::UNLOCK;
                        }
                    }
                    break;
                default:
                    return self::OTHER;
            }
        }
        return self::OTHER;
    }
UPDATE' ' | USE' '