Im not sure wether I like your way of parsing arguments, it isn't compatible with the usual way arguments works, eg. normally you can supply two single letter arguments like this: `-rf` but looking at the code that would result in one argument named 'rf' and not two.
Also you cannot have a string argument that starts with a dash, because $argv is stripped of quotes, so `-f "-dashval"` will not result in arg(f) === '-dashval'
All in all it is probably a nice personal tool, but I just don't see what value it has over using the PHP 'getopt' function.
1 comment
[ 3.3 ms ] story [ 8.1 ms ] threadAlso you cannot have a string argument that starts with a dash, because $argv is stripped of quotes, so `-f "-dashval"` will not result in arg(f) === '-dashval'
All in all it is probably a nice personal tool, but I just don't see what value it has over using the PHP 'getopt' function.