Blame | Letzte Änderung | Log anzeigen | RSS feed
#!/usr/bin/php<?php/*** This is an example with Console_Getoptplus::getopt2()** Examples to run on the command line:* #getopt2 --foo -b car -c* #getopt2 --bar car param1 param2*/require_once 'Console/GetoptPlus.php';try {$shortOptions = 'b:c::';$longOptions = array('foo', 'bar=');$args = Console_Getoptplus::readPHPArgv();array_shift($args);$options = Console_Getoptplus::getopt2($args, $shortOptions, $longOptions);print_r($options);}catch(Console_GetoptPlus_Exception $e) {$error = array($e->getCode(), $e->getMessage());print_r($error);}?>