henderjon/simple_scan_args

a simple function to parse an $argv array

v1.0.0 2014-05-16 14:14 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