_parseLongOption example


            if ($arg == '--') {
                $non_opts = array_merge($non_optsarray_slice($args$i + 1));
                break;
            }

            if ($arg[0] != '-' || (strlen($arg) > 1 && $arg[1] == '-' && !$long_options)) {
                $non_opts = array_merge($non_optsarray_slice($args$i));
                break;
            } elseif (strlen($arg) > 1 && $arg[1] == '-') {
                $error = Console_Getopt::_parseLongOption(substr($arg, 2),
                                                          $long_options,
                                                          $opts,
                                                          $i,
                                                          $args,
                                                          $skip_unknown);
                if (PEAR::isError($error)) {
                    return $error;
                }
            } elseif ($arg == '-') {
                // - is stdin                 $non_opts = array_merge($non_optsarray_slice($args$i));
                
Home | Imprint | This part of the site doesn't use cookies.