private function stateESC($str, $pos, &$next) { $pos++; if ($pos >= strlen($str)) { return false; } $next = 'stateQ'; return $pos; }