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 74e4e44 commit ca54c94Copy full SHA for ca54c94
phpctags
@@ -138,10 +138,15 @@ try {
138
die("phpctags: {$e->getMessage()}");
139
}
140
141
+// write to a specified file
142
if (isset($options['f']) && $options['f'] !== '-') {
143
$tagfile = fopen($options['f'], isset($options['a']) ? 'a' : 'w');
-} else {
144
+// write to stdout only when instructed
145
+} else if (isset($options['f']) && $options['f'] === '-') {
146
$tagfile = fopen('php://stdout', 'w');
147
+// write to file 'tags' by default
148
+} else {
149
+ $tagfile = fopen('tags', isset($options['a']) ? 'a' : 'w');
150
151
fwrite($tagfile, $result);
152
fclose($tagfile);
0 commit comments