Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on May 15, 2024 via composer

pear/console_getopt v1.4.3

More info available on: http://pear.php.net/package/Console_Getopt
Package summary
Share
0
issues
1
license
1
BSD-2-Clause
Package created
22 Jun 2014
Version published
20 Nov 2019
Maintainers
2
Total deps
1
Direct deps
0
License
BSD-2-Clause

Issues

0
This package has no issues

Licenses

BSD 2-Clause "Simplified" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
pear/console_getopt@v1.4.3
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of pear/console_getopt 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does pear/console_getopt do?

The pear/console_getopt is a PHP implementation of the "getopt" option parsing service. Known for supporting both short and long command-line options, this package plays a crucial role in parsing command-line options within your PHP script, thus enhancing the effectiveness of command-line binary scripting.

How do you use pear/console_getopt?

Using pear/console_getopt involves initiating the package in your PHP script and running the package's methods to parse your command-line options. Here is a basic code example demonstrating how to use Console_Getopt:

require_once 'Console/Getopt.php';

$cg = new Console_Getopt();
$args = $cg->readPHPArgv();

// define short options
$shortOptions = 'a:b:c'; 

// define long options
$longOptions = ['name=', 'age=', 'gender'];  

$options = $cg->getopt3($args, $shortOptions, $longOptions);

print_r($options);

In this example, getopt3 method is used to parse both short and long command-line options. The -a, -b, and -c are the short options while name=, age=, and gender represent long options in getopt3. The result of the options are printed using print_r.

Where are the pear/console_getopt docs?

The pear/console_getopt documentation is readily accessible at the package's homepage at http://pear.php.net/package/Console_Getopt. This page offers a comprehensive insight into how the package operates, including additional methods and their usages. It is an essential resource for anyone looking to fully harness the potentials of this package in their PHP environment.