original_string: function utf8CharToUnumber($str, $hex = 0) {
  		$ord = ord(substr($str, 0, 1)); // First char
  
  		if (($ord & 192) == 192) { // This verifyes that it IS a multi byte string
  			$binBuf = '';
  			for ($b = 0; $b < 8; $b++) { // for each byte in multibyte string...
  				$ord = $ord << 1; // Shift it left and ...
  				if ($ord & 128) { // ... and with 8th bit - if that is set, then there are still bytes in sequence.
  					$binBuf .= substr('00000000' . decbin(ord(substr($str, $b + 1, 1))), -6);
  				} else {
  					break;
  				}
  			}
  			$binBuf = substr('00000000' . decbin(ord(substr($str, 0, 1))), -(6 - $b)) . $binBuf;
  
  			$int = bindec($binBuf);
  		} else {
  			$int = $ord;
  		}
  
  		return $hex ? 'x' . dechex($int) : $int;
  	}
code: function utf8CharToUnumber($str, $hex = 0) {
  		$ord = ord(substr($str, 0, 1)); // First char
  
  		if (($ord & 192) == 192) { // This verifyes that it IS a multi byte string
  			$binBuf = '';
  			for ($b = 0; $b < 8; $b++) { // for each byte in multibyte string...
  				$ord = $ord << 1; // Shift it left and ...
  				if ($ord & 128) { // ... and with 8th bit - if that is set, then there are still bytes in sequence.
  					$binBuf .= substr('00000000' . decbin(ord(substr($str, $b + 1, 1))), -6);
  				} else {
  					break;
  				}
  			}
  			$binBuf = substr('00000000' . decbin(ord(substr($str, 0, 1))), -(6 - $b)) . $binBuf;
  
  			$int = bindec($binBuf);
  		} else {
  			$int = $ord;
  		}
  
  		return $hex ? 'x' . dechex($int) : $int;
  	}
code_tokens: function utf8CharToUnumber ( $ str , $ hex = 0 ) { $ ord = ord ( substr ( $ str , 0 , 1 ) ) ; // First char if ( ( $ ord & 192 ) == 192 ) { // This verifyes that it IS a multi byte string $ binBuf = '' ; for ( $ b = 0 ; $ b < 8 ; $ b ++ ) { // for each byte in multibyte string... $ ord = $ ord << 1 ; // Shift it left and ... if ( $ ord & 128 ) { // ... and with 8th bit - if that is set, then there are still bytes in sequence. $ binBuf .= substr ( '00000000' . decbin ( ord ( substr ( $ str , $ b + 1 , 1 ) ) ) , - 6 ) ; } else { break ; } } $ binBuf = substr ( '00000000' . decbin ( ord ( substr ( $ str , 0 , 1 ) ) ) , - ( 6 - $ b ) ) . $ binBuf ; $ int = bindec ( $ binBuf ) ; } else { $ int = $ ord ; } return $ hex ? 'x' . dechex ( $ int ) : $ int ; }
docstring: Converts a UTF-8 Multibyte character to a UNICODE number
  Unit-tested by Kasper
  
  @param	string		UTF-8 multibyte character string
  @param	boolean		If set, then a hex. number is returned.
  @return	integer		UNICODE integer
  @see UnumberToChar()
docstring_tokens: Converts a UTF - 8 Multibyte character to a UNICODE number Unit - tested by Kasper