function Console_Getopt::_isShortOpt
Checks if an argument is a short option
Parameters
string $arg Argument to check:
Return value
bool
2 calls to Console_Getopt::_isShortOpt()
- Console_Getopt::_parseLongOption in vendor/
pear/ console_getopt/ Console/ Getopt.php - Parse long option
- Console_Getopt::_parseShortOption in vendor/
pear/ console_getopt/ Console/ Getopt.php - Parse short option
File
-
vendor/
pear/ console_getopt/ Console/ Getopt.php, line 242
Class
- Console_Getopt
- Command-line options parsing class.
Code
protected static function _isShortOpt($arg) {
return strlen($arg) == 2 && $arg[0] == '-' && preg_match('/[a-zA-Z]/', $arg[1]);
}