Ad
  • Custom User Avatar

    You only check there is an equal number of opening and closing brackets, but it is not enough: ")(" isn't correct but your code cannot detect it.

    Also, please use markdown tags to format your code or it's very discomfortable to read, see: how-to-format-code-in-markdown.