uawdijnntqw1x1x1
IP : 216.73.216.163
Hostname : yjpwxulqtt
Kernel : Linux yjpwxulqtt 5.15.0-126-generic #136-Ubuntu SMP Wed Nov 6 10:38:22 UTC 2024 x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,exec,system,passthru,shell_exec,proc_open,popen
OS : Linux
PATH:
/
home
/
user
/
web
/
pansionat-v-yaroslavle.ru
/
public_html
/
bitrix
/
modules
/
main
/
lib
/
text
/
utfsafestring.php
/
/
<?php /** * Bitrix Framework * @package bitrix * @subpackage main * @copyright 2001-2016 Bitrix */ namespace Bitrix\Main\Text; class UtfSafeString { public static function getLastPosition($haystack, $needle) { if (defined("BX_UTF")) { //mb_strrpos does not work on invalid UTF-8 strings $ln = strlen($needle); for ($i = strlen($haystack) - $ln; $i >= 0; $i--) { if (substr($haystack, $i, $ln) == $needle) { return $i; } } return false; } return strrpos($haystack, $needle); } public static function rtrimInvalidUtf($string) { //valid UTF-8 octet sequences //0xxxxxxx //110xxxxx 10xxxxxx //1110xxxx 10xxxxxx 10xxxxxx //11110xxx 10xxxxxx 10xxxxxx 10xxxxxx $last4bytes = \CUtil::binsubstr($string, -3); $reversed = array_reverse(unpack("C*", $last4bytes)); if (($reversed[0] & 0x80) === 0x00) //ASCII return $string; elseif (($reversed[0] & 0xC0) === 0xC0) //Start of utf seq (cut it!) return \CUtil::binsubstr($string, 0, -1); elseif (($reversed[1] & 0xE0) === 0xE0) //Start of utf seq (longer than 2 bytes) return \CUtil::binsubstr($string, 0, -2); elseif (($reversed[2] & 0xE0) === 0xF0) //Start of utf seq (longer than 3 bytes) return \CUtil::binsubstr($string, 0, -3); return $string; } }
/home/user/web/pansionat-v-yaroslavle.ru/public_html/bitrix/modules/main/lib/text/utfsafestring.php