php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #46937 Make getopt() usable with non-option arguments
Submitted: 2008-12-24 10:03 UTC Modified: 2009-01-02 13:54 UTC
From: kristof dot coomans at telenet dot be Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 5.3CVS-2008-12-24 (snap) OS: Doesn't matter
Private report: No CVE-ID: None
 [2008-12-24 10:03 UTC] kristof dot coomans at telenet dot be
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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-01-02 12:54 UTC] dsp@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 [2009-01-02 12:56 UTC] dsp@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Expected behavior.
 [2009-01-02 13:54 UTC] kristof dot coomans at telenet dot be
I didn't report this as a bug, but under the category "Feature/Change RequestFeature". I think this is a good enhancement and do not understand why it gets closed with a standard reply of "Please double-check the documentation".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 15 03:01:33 2024 UTC