original_string: function utf8_to_numberarray($str, $convEntities = 0, $retChar = 0) {
  			// If entities must be registered as well...:
  		if ($convEntities) {
  			$str = $this->entities_to_utf8($str, 1);
  		}
  			// Do conversion:
  		$strLen = strlen($str);
  		$outArr = array();
  		$buf = '';
  		for ($a = 0; $a < $strLen; $a++) { // Traverse each char in UTF-8 string.
  			$chr = substr($str, $a, 1);
  			$ord = ord($chr);
  			if ($ord > 127) { // This means multibyte! (first byte!)
  				if ($ord & 64) { // Since the first byte must have the 7th bit set we check that. Otherwise we might be in the middle of a byte sequence.
  					$buf = $chr; // Add first byte
  					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.
  							$a++; // Increase pointer...
  							$buf .= substr($str, $a, 1); // ... and add the next char.
  						} else {
  							break;
  						}
  					}
  
  					$outArr[] = $retChar ? $buf : $this->utf8CharToUnumber($buf);
  				} else {
  					$outArr[] = $retChar ? chr($this->noCharByteVal) : $this->noCharByteVal;
  				} // No char exists (MIDDLE of MB sequence!)
  			} else {
  				$outArr[] = $retChar ? chr($ord) : $ord;
  			} // ... otherwise it's just ASCII 0-127 and one byte. Transparent
  		}
  
  		return $outArr;
  	}
code: function utf8_to_numberarray($str, $convEntities = 0, $retChar = 0) {
  			// If entities must be registered as well...:
  		if ($convEntities) {
  			$str = $this->entities_to_utf8($str, 1);
  		}
  			// Do conversion:
  		$strLen = strlen($str);
  		$outArr = array();
  		$buf = '';
  		for ($a = 0; $a < $strLen; $a++) { // Traverse each char in UTF-8 string.
  			$chr = substr($str, $a, 1);
  			$ord = ord($chr);
  			if ($ord > 127) { // This means multibyte! (first byte!)
  				if ($ord & 64) { // Since the first byte must have the 7th bit set we check that. Otherwise we might be in the middle of a byte sequence.
  					$buf = $chr; // Add first byte
  					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.
  							$a++; // Increase pointer...
  							$buf .= substr($str, $a, 1); // ... and add the next char.
  						} else {
  							break;
  						}
  					}
  
  					$outArr[] = $retChar ? $buf : $this->utf8CharToUnumber($buf);
  				} else {
  					$outArr[] = $retChar ? chr($this->noCharByteVal) : $this->noCharByteVal;
  				} // No char exists (MIDDLE of MB sequence!)
  			} else {
  				$outArr[] = $retChar ? chr($ord) : $ord;
  			} // ... otherwise it's just ASCII 0-127 and one byte. Transparent
  		}
  
  		return $outArr;
  	}
code_tokens: function utf8_to_numberarray ( $ str , $ convEntities = 0 , $ retChar = 0 ) { // If entities must be registered as well...: if ( $ convEntities ) { $ str = $ this -> entities_to_utf8 ( $ str , 1 ) ; } // Do conversion: $ strLen = strlen ( $ str ) ; $ outArr = array ( ) ; $ buf = '' ; for ( $ a = 0 ; $ a < $ strLen ; $ a ++ ) { // Traverse each char in UTF-8 string. $ chr = substr ( $ str , $ a , 1 ) ; $ ord = ord ( $ chr ) ; if ( $ ord > 127 ) { // This means multibyte! (first byte!) if ( $ ord & 64 ) { // Since the first byte must have the 7th bit set we check that. Otherwise we might be in the middle of a byte sequence. $ buf = $ chr ; // Add first byte 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. $ a ++ ; // Increase pointer... $ buf .= substr ( $ str , $ a , 1 ) ; // ... and add the next char. } else { break ; } } $ outArr [ ] = $ retChar ? $ buf : $ this -> utf8CharToUnumber ( $ buf ) ; } else { $ outArr [ ] = $ retChar ? chr ( $ this -> noCharByteVal ) : $ this -> noCharByteVal ; } // No char exists (MIDDLE of MB sequence!) } else { $ outArr [ ] = $ retChar ? chr ( $ ord ) : $ ord ; } // ... otherwise it's just ASCII 0-127 and one byte. Transparent } return $ outArr ; }
docstring: Converts all chars in the input UTF-8 string into integer numbers returned in an array
  
  @param	string		Input string, UTF-8
  @param	boolean		If set, then all HTML entities (like &amp; or &pound; or &#123; or &#x3f5d;) will be detected as characters.
  @param	boolean		If set, then instead of integer numbers the real UTF-8 char is returned.
  @return	array		Output array with the char numbers
docstring_tokens: Converts all chars in the input UTF - 8 string into integer numbers returned in an array