original_string: public function getOption($char = '', $name = '', $required = null)
      {
          if (!$char && !$name) {
              return false;
          }
          if ($char && (1 < strlen($char) || 1 !== preg_match('/^\w$/', $char))) {
              return false;
          }
          if ($name && (1 !== preg_match('/^\w+$/', $name))) {
              return false;
          }
          switch ($required) {
              case true:
                  $char = $char ? $char.':' : $char;
                  $name = $name ? $name.':' : $name;
                  break;
              case false:
                  $char = $char ? $char.'::' : $char;
                  $name = $name ? $name.'::' : $name;
                  break;
          }
          $argv = ($opts = getopt($char, [$name])) ? array_shift($opts) : [];
          return is_array($argv) ? array_shift($argv) : $argv;
      }
code: public function getOption($char = '', $name = '', $required = null)
      {
          if (!$char && !$name) {
              return false;
          }
          if ($char && (1 < strlen($char) || 1 !== preg_match('/^\w$/', $char))) {
              return false;
          }
          if ($name && (1 !== preg_match('/^\w+$/', $name))) {
              return false;
          }
          switch ($required) {
              case true:
                  $char = $char ? $char.':' : $char;
                  $name = $name ? $name.':' : $name;
                  break;
              case false:
                  $char = $char ? $char.'::' : $char;
                  $name = $name ? $name.'::' : $name;
                  break;
          }
          $argv = ($opts = getopt($char, [$name])) ? array_shift($opts) : [];
          return is_array($argv) ? array_shift($argv) : $argv;
      }
code_tokens: public function getOption ( $ char = '' , $ name = '' , $ required = null ) { if ( ! $ char && ! $ name ) { return false ; } if ( $ char && ( 1 < strlen ( $ char ) || 1 !== preg_match ( '/^\w$/' , $ char ) ) ) { return false ; } if ( $ name && ( 1 !== preg_match ( '/^\w+$/' , $ name ) ) ) { return false ; } switch ( $ required ) { case true : $ char = $ char ? $ char . ':' : $ char ; $ name = $ name ? $ name . ':' : $ name ; break ; case false : $ char = $ char ? $ char . '::' : $ char ; $ name = $ name ? $ name . '::' : $ name ; break ; } $ argv = ( $ opts = getopt ( $ char , [ $ name ] ) ) ? array_shift ( $ opts ) : [ ] ; return is_array ( $ argv ) ? array_shift ( $ argv ) : $ argv ; }
docstring: Get arguments from command line
  
  @access public
  
  @param string $char -a .. -z option char
  @param string $name --optionName_string
  @param bool|null $required Required value?
  
  @return mixed
docstring_tokens: Get arguments from command line