Registry / cli / ulrichsg-getopt-php

ulrichsg-getopt-php

JSON →
library4.0.4phppackagistunverified

Command line arguments parser for PHP 7.1 and above

composer require ulrichsg/getopt-php
INSTALL
IMPORT
SIG · ULRICHSG-GETOPT-PH
U
ulrichsg-getopt-php
cliphpv4.0.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Getopt
use Ulrichsg\Getopt\Getopt;

Parse command line options with GetOpt

use Ulrichsg\Getopt\Getopt; $getopt = new Getopt([ ['f', 'file', Getopt::REQUIRED_ARGUMENT, 'Input file'], ['v', 'verbose', Getopt::NO_ARGUMENT, 'Verbose output'] ]); $getopt->parse(); $file = $getopt->getOption('file');
Debug
Known issues
breakingPHP version requirement: PHP 7.1 or above
fix
Ensure your PHP version is 7.1+
affects: <4.0.0
Upgrade
Version history
4.0.4latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
31 hits · last 30 days
node
28
Amazon
1
Resources
ulrichsg-getopt-php — pip install ulrichsg-getopt-php · libregistry