We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e6b3f62 commit 94efe53Copy full SHA for 94efe53
phpctags
@@ -25,6 +25,18 @@ $options = getopt('af:Nno:RuV', array(
25
'memory::',
26
));
27
28
+// prune options and its value from the $argv array
29
+$argv_ = array();
30
+foreach ($options as $option => $value) {
31
+ foreach ($argv as $key => $chunk) {
32
+ $regex = '/^'. (isset($option[1]) ? '--' : '-') . $option . '/';
33
+ if ($chunk == $value && $argv[$key-1][0] == '-' || preg_match($regex, $chunk)) {
34
+ array_push($argv_, $key);
35
+ }
36
37
+}
38
+while ($key = array_pop($argv_)) unset($argv[$key]);
39
+
40
// option -V is an alternative to --version
41
if (isset($options['V'])) {
42
$options['version'] = FALSE;
0 commit comments