__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
/**
* @package utf8
*/
//---------------------------------------------------------------
/**
* UTF-8 aware alternative to ord
* Returns the unicode ordinal for a character
*
* Joomla modification - As of PHP 7.4, curly brace access has been deprecated. As a result this function has been
* modified to use square brace syntax
* See https://github.com/php/php-src/commit/d574df63dc375f5fc9202ce5afde23f866b6450a
* for additional references
*
* @param string UTF-8 encoded character
* @return int unicode ordinal for the character
* @see http://www.php.net/ord
* @see http://www.php.net/manual/en/function.ord.php#46267
*/
function utf8_ord($chr) {
$ord0 = ord($chr);
if ( $ord0 >= 0 && $ord0 <= 127 ) {
return $ord0;
}
if ( !isset($chr[1]) ) {
trigger_error('Short sequence - at least 2 bytes expected, only 1 seen');
return FALSE;
}
$ord1 = ord($chr[1]);
if ( $ord0 >= 192 && $ord0 <= 223 ) {
return ( $ord0 - 192 ) * 64
+ ( $ord1 - 128 );
}
if ( !isset($chr[2]) ) {
trigger_error('Short sequence - at least 3 bytes expected, only 2 seen');
return FALSE;
}
$ord2 = ord($chr[2]);
if ( $ord0 >= 224 && $ord0 <= 239 ) {
return ($ord0-224)*4096
+ ($ord1-128)*64
+ ($ord2-128);
}
if ( !isset($chr[3]) ) {
trigger_error('Short sequence - at least 4 bytes expected, only 3 seen');
return FALSE;
}
$ord3 = ord($chr[3]);
if ($ord0>=240 && $ord0<=247) {
return ($ord0-240)*262144
+ ($ord1-128)*4096
+ ($ord2-128)*64
+ ($ord3-128);
}
if ( !isset($chr[4]) ) {
trigger_error('Short sequence - at least 5 bytes expected, only 4 seen');
return FALSE;
}
$ord4 = ord($chr[4]);
if ($ord0>=248 && $ord0<=251) {
return ($ord0-248)*16777216
+ ($ord1-128)*262144
+ ($ord2-128)*4096
+ ($ord3-128)*64
+ ($ord4-128);
}
if ( !isset($chr[5]) ) {
trigger_error('Short sequence - at least 6 bytes expected, only 5 seen');
return FALSE;
}
if ($ord0>=252 && $ord0<=253) {
return ($ord0-252) * 1073741824
+ ($ord1-128)*16777216
+ ($ord2-128)*262144
+ ($ord3-128)*4096
+ ($ord4-128)*64
+ (ord($chr[5])-128);
}
if ( $ord0 >= 254 && $ord0 <= 255 ) {
trigger_error('Invalid UTF-8 with surrogate ordinal '.$ord0);
return FALSE;
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| mbstring | Folder | 0775 |
|
|
| native | Folder | 0775 |
|
|
| utils | Folder | 0775 |
|
|
| LICENSE | File | 25.81 KB | 0664 |
|
| README | File | 3.21 KB | 0664 |
|
| ord.php | File | 2.57 KB | 0664 |
|
| str_ireplace.php | File | 1.89 KB | 0664 |
|
| str_pad.php | File | 1.62 KB | 0664 |
|
| str_split.php | File | 764 B | 0664 |
|
| strcasecmp.php | File | 486 B | 0664 |
|
| strcspn.php | File | 834 B | 0664 |
|
| stristr.php | File | 795 B | 0664 |
|
| strrev.php | File | 398 B | 0664 |
|
| strspn.php | File | 863 B | 0664 |
|
| substr_replace.php | File | 562 B | 0664 |
|
| trim.php | File | 2.08 KB | 0664 |
|
| ucfirst.php | File | 727 B | 0664 |
|
| ucwords.php | File | 1.36 KB | 0664 |
|
| utf8.php | File | 2.68 KB | 0664 |
|