getOption($v)) { switch ($c) { case 'b': $base = intval($v); break; case '__ambiguous': $this->resolveOptionAmbiguity($v); break; case 'h': case '?': default: return $this->usage(); } } $this->parser->listInputs($char); $code = base_convert((string) Ustring::toCode($char), 10, $base); echo $code, "\n"; return; } /** * The command usage. * * @return int */ public function usage() { echo 'Usage : ustring:tocode ', "\n", 'Options :', "\n", $this->makeUsageOptionsList([ 'b' => 'Get the code in a specific base (16 by default).', 'help' => 'This help.' ]), "\n"; return; } } __halt_compiler(); Transform a character into its code.