From: RQuadling at GMail dot com Operating system: irrelevant PHP version: 5.3CVS-2007-12-13 (snap) PHP Bug Type: Feature/Change Request Bug description: Allow getopt to set False by handling a trailing - on a non-optional parameter.
Description: ------------ Currently you can you getopt to support the following formats -t -p=value -p value -o[=value] --test --param=value --optionalparam[=value] NOTE -o [value] --optionalparam [value] are not supported at the moment. What I would like to have supported is ... -t- -t+ --test- --test+ This would provide a fix for 23859 by allowing you to explicitly state the boolean value rather than relying on the arguable counter-intuitive value returned for boolean tests. It would also allow you to be able to document default boolean flags and supply a method of disabling them using the same flag rather than having to have an enableflag and a disableflag setting. If people have been using + or - in there long parameter names, then I suppose this will be a BC for them, but in simple testing it looks like you can't have them in your long opts. Please. Regards, Richard Quadling. -- Edit bug report at http://bugs.php.net/?id=43587&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43587&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43587&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43587&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43587&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=43587&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=43587&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=43587&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=43587&r=needscript Try newer version: http://bugs.php.net/fix.php?id=43587&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=43587&r=support Expected behavior: http://bugs.php.net/fix.php?id=43587&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=43587&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=43587&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=43587&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43587&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=43587&r=dst IIS Stability: http://bugs.php.net/fix.php?id=43587&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=43587&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=43587&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=43587&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=43587&r=mysqlcfg