src/CLIParser.php
private function getLongOptionKey($arg)
    {

        $key = (false !== ($eqPos = strpos($arg, '='))) ?
            substr($arg, 2, $eqPos - 2) : // --key=value
            substr($arg, 2); // --key value

        return $key;
    }
private function getLongOptionKey($arg)
    {

        $key = (false !== ($eqPos = strpos($arg, '='))) ?
            substr($arg, 2, $eqPos - 2) : // --key=value
            substr($arg, 2); // --key value

        return $key;
    }
private function getLongOptionKey ( $ arg ) { $ key = ( false !== ( $ eqPos = strpos ( $ arg , '=' ) ) ) ? substr ( $ arg , 2 , $ eqPos - 2 ) : // --key=value substr ( $ arg , 2 ) ; // --key value return $ key ; }
Extracts the key from a long option

Two syntax are allowed: '--key=value' and '--key value'

@param string $arg The argument to parse
@return string
Extracts the key from a long option