Page 1 of 1

PHP: Getting options from cmd-line argument list: Standard?

Posted: Fri Feb 05, 2010 9:41 am
by jeff00seattle
Hi

Is there a PHP standard at to expected option handling from command-line argument list?

I look at PHP getopt(), and it is not enough for me. I do not like that I have to use a single character to define each option, because I prefer a single more discriptive word instead for each option.

However, not to displease the PHP community when creating a command-line utility, I want to know if...
  1. Is getopt() the standard?
  2. Must I begin each option with a dash(-) ?
  3. Must I use a single character to define an option?
  4. What is the expected delimiter when an option is provided multiple values? Some use semicolons, for example foo.php has an option "bar" with three values "a, b, & c": "foo.php -bar:a;b;c"
Thanks

Jeff in Seattle