diversen/parse-argv

Parse argv and get options and arguments

Installs: 3 488

Dependents: 2

Suggesters: 0

Security: 0

Stars: 3

Watchers: 2

Forks: 1

Open Issues: 0

pkg:composer/diversen/parse-argv

v4.1.0 2023-03-22 06:22 UTC

This package is auto-updated.

Last update: 2025-09-22 12:02:01 UTC


README

Any options are denoted by '-' or '--' and any option value must be specified by '='

You may cast options to int, float or booleans

Install:

composer require diversen/parse-argv

Example

Run the following test script:

php example.php  -h --help --message=hello --to-int=100 --to-float=100.5 --to-bool=false argument1 argument2

See: example.php

Test

git clone git@github.com:diversen/parse-argv.git
cd parse-argv
composer install
./test.sh

License MIT