henderjon/simple_scan_args

This package is abandoned and no longer maintained. No replacement package was suggested.

a simple function to parse an $argv array

v1.0.0 2014-05-16 14:14 UTC

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