Who know enough the 4 packages to write a "comparative" description in de pear documentation for final user ?
As I understand, in short:
- Console_GetOpt: standard getopt implementation;
- Console_GetOptPlus: php5 rewrite of getopt with added features;
- Console_GetArgs: object oriented full featured parser;
- Console_CommandLine: similar to GetArgs with php5 and added features;
A comparative:
DISCLAIMER: I may be biased since I'am the author of Console_CommandLine, so feel free to correct this table.
+---------------------------------------------------------------------+
| | GetOpt | GetOptPlus | GetArgs | CommandLine |
+---------------------------------------------------------------------+
| PHP4 | X | | X | |
+---------------------------------------------------------------------+
| PHP5 | | X | X | X |
+---------------------------------------------------------------------+
| PHP5 with E_STRICT | | X | | X |
+---------------------------------------------------------------------+
| Has end user doc | X | | | X |
+---------------------------------------------------------------------+
| Stability | Stable | Beta | Stable | Beta |
+---------------------------------------------------------------------+
| POSIX/GNU compliance | X | X | | X |
+---------------------------------------------------------------------+
| Generate help | | X | X | X |
+---------------------------------------------------------------------+
| Generate version | | | | X |
+---------------------------------------------------------------------+
| Arguments validation | | | X | X |
+---------------------------------------------------------------------+
| Handle passwd options | | | | X |
+---------------------------------------------------------------------+
| Options validation | | | | X |
+---------------------------------------------------------------------+
| Sub-commands | | | | X |
+---------------------------------------------------------------------+
| Opt. callback actions | | | | X |
+---------------------------------------------------------------------+
| Xml def. support | | | | X |
+---------------------------------------------------------------------+
| L10n/I18n support | | | | X |
+---------------------------------------------------------------------+
Hope this helps,
David.