public function parse($arguments = null)
    {
        try{
            global $argv;
            $arguments = $arguments ?? $argv;
            $argPointer = 1;
            $parsed = [];
            $this->name = $this->name ?? $arguments[0];
            $this->parseCommand($arguments, $argPointer, $parsed);
            $this->parseArgumentArray($arguments, $argPointer, $parsed);
            $this->maybeShowHelp($parsed);
            $this->validator->validateArguments($this->options, $parsed);
            $this->fillInDefaults($parsed);
            $parsed['__executed'] = $this->name;
            return $parsed;
        } catch (HelpMessageRequestedException $exception) {
            $this->programControl->quit();
        } catch (InvalidArgumentException $exception) {
            print $exception->getMessage() . PHP_EOL;
            $this->programControl->quit();
        }
    }