Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Getopt.php

function Console_Getopt::getopt

This function expects $args to start with the script name (POSIX-style). Preserved for backwards compatibility.

Parameters

array $args an array of command-line arguments:

string $short_options specifies the list of allowed short options:

array $long_options specifies the list of allowed long options:

Return value

array two-element array containing the list of parsed options and the non-option arguments

See also

getopt2()

File

vendor/pear/console_getopt/Console/Getopt.php, line 86

Class

Console_Getopt
Command-line options parsing class.

Code

public static function getopt($args, $short_options, $long_options = null, $skip_unknown = false) {
    return Console_Getopt::doGetopt(1, $args, $short_options, $long_options, $skip_unknown);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal