henderjon / simple_scan_args
a simple function to parse an $argv array
Installs: 136
Dependents: 0
Suggesters: 1
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/henderjon/simple_scan_args
Requires
- php: >=5.3.0
Requires (Dev)
- funkatron/funit: dev-master
This package is auto-updated.
Last update: 2023-04-06 05:56:23 UTC
README
simple_scan_args is a CLI function that will parse an array for -flags and -key=value pairs. It supports the following syntax: "-f" "-flag" "-key=value" "-key value". Using one or more dashes has no effect.
usage
$args = simple_scan_args($_SERVER["argv"], array $keys, array $flags);
installation
Using composer "require" : { "henderjon/simple_scan_args": "1.*" }
license
See LICENSE.md for the BSD-3-Clause license.
links
- The Packagist archive
- Reading on Semantic Versioning
- Reading onComposer Versioning