From: kristof dot coomans at telenet dot be Operating system: Doesn't matter PHP version: 5.3CVS-2008-12-24 (snap) PHP Bug Type: Feature/Change Request Bug description: Make getopt() usable with non-option arguments
Description: ------------ Now that PHP 5.3 will have getopt() available on all platforms, I think it's important to also make it as usable as possible. Currently, getopt() is not usable for command line scripts that have both option and non-option arguments, because it doesn't modify argv, as pointed out already in 2003 in this comment: http://www.php.net/getopt#34163. Stripping away the option arguments from argv when a call to getopt() is made would be a great improvement. User land code can handle the remaining non-option arguments from argv then. -- Edit bug report at http://bugs.php.net/?id=46937&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46937&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46937&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46937&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46937&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=46937&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=46937&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46937&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46937&r=needscript Try newer version: http://bugs.php.net/fix.php?id=46937&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46937&r=support Expected behavior: http://bugs.php.net/fix.php?id=46937&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46937&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46937&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46937&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46937&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46937&r=dst IIS Stability: http://bugs.php.net/fix.php?id=46937&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46937&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46937&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46937&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46937&r=mysqlcfg