function Console_Getopt::_isLongOpt
Checks if an argument is a long option
Parameters
string $arg Argument to check:
Return value
bool
2 calls to Console_Getopt::_isLongOpt()
- 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 255
Class
- Console_Getopt
- Command-line options parsing class.
Code
protected static function _isLongOpt($arg) {
return strlen($arg) > 2 && $arg[0] == '-' && $arg[1] == '-' && preg_match('/[a-zA-Z]+$/', substr($arg, 2));
}