PHP code example of aidantwoods / betteroptions

1. Go to this page and download the library: Download aidantwoods/betteroptions library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

aidantwoods / betteroptions example snippets


foo:
array(2) {
  [0]=>
  string(4) "asda"
  [1]=>
  string(4) "sdsg"
}

bar:
string(4) "dsgs"

baz:
NULL

boo:
NULL

help:
NULL

foo:
string(4) "asda"
bash
$ php example.php --foo=asda --foo=sdsg --bar=dsgs
bash
$ php example.php
bash
$ php example.php --help