Created
January 16, 2009 17:32
-
-
Save sotarok/48022 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- dict_orig.php 2009-01-16 21:44:35.000000000 +0900 | |
+++ dict.php 2009-01-17 01:35:08.000000000 +0900 | |
@@ -15,19 +15,17 @@ | |
$d = false; | |
$usage = null; | |
if ($argc > 1) { | |
- foreach ($argv as $key => $val) { | |
- if ($argv[$key] === basename(__FILE__)) { | |
- continue; | |
- } else if ($argv[$key] === '-c') { | |
+ foreach (array_slice($argv, 1) as $val) { | |
+ if ($val === '-c') { | |
// Classes | |
$c = true; | |
- } else if ($argv[$key] === '-f') { | |
+ } else if ($val === '-f') { | |
// Functions | |
$f = true; | |
- } else if ($argv[$key] === '-i') { | |
+ } else if ($val === '-i') { | |
// Interfaces | |
$i = true; | |
- } else if ($argv[$key] === '-d') { | |
+ } else if ($val === '-d') { | |
// Constants | |
$d = true; | |
} else { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment