php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #46938 Make getopt() report wrong options
Submitted: 2008-12-24 10:13 UTC Modified: 2009-01-02 13:55 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: Irrelevant
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: kristof dot coomans at telenet dot be
New email:
PHP Version: OS:

 

 [2008-12-24 10:13 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() does not report in any way if there were any wrong options provided on the command line. It would be nice to be able to give the end user feedback on non-existing options he/she provided, or about options he/she provided that require a value but for which no value was supplied.

The ability to retrieve a list of option errors should be provided, either by:
- throwing an exception
or
- a 3rd by-reference array argument to getopt()


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-01-02 13:03 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:55 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 14:01:36 2024 UTC