PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
Notice: ob_end_clean(): Failed to delete buffer. No buffer to delete in /home/telusvwg/public_html/da754d/index.php on line 8
$#$#$#

Dir : /usr/local/lsws/add-ons/webcachemgr/src/ThirdParty/Polyfill/
Server: Linux premium279.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
IP: 66.29.132.192
Choose File :

Url:
Dir : //usr/local/lsws/add-ons/webcachemgr/src/ThirdParty/Polyfill/Utf8.php

<?php

/**
 * This file contains paired-down/modified code originally found in Symfony
 * package file Php72.php, used here as a PHP standard replacement for now
 * deprecated PHP functions utf8_encode() and utf8_decode().
 *
 * Modified by: Michael Alegre (LiteSpeed Technologies, Inc.), 2023
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Lsc\Wp\ThirdParty\Polyfill;

/**
 * @since 1.16.1
 */
class Utf8
{
    /**
     *
     * @since 1.16.1
     *
     * @param $s
     *
     * @return false|string
     */
    public static function encode($s)
    {
        $s .= $s;
        $len = strlen($s);

        for ($i = $len >> 1, $j = 0; $i < $len; ++$i, ++$j) {

            if ( $s[$i] < "\x80" ) {
                $s[$j] = $s[$i];
            }
            elseif ( $s[$i] < "\xC0" ) {
                $s[$j] = "\xC2";
                $s[++$j] = $s[$i];
            }
            else {
                $s[$j] = "\xC3";
                $s[++$j] = chr(ord($s[$i]) - 64);
            }
        }

        return substr($s, 0, $j);
    }

    /**
     *
     * @since 1.16.1
     *
     * @param $s
     *
     * @return false|string
     */
    public static function decode($s)
    {
        $s = (string) $s;
        $len = strlen($s);

        for ($i = 0, $j = 0; $i < $len; ++$i, ++$j) {

            switch ($s[$i] & "\xF0") {
                case "\xC0":
                case "\xD0":
                    $c = (ord($s[$i] & "\x1F") << 6) | ord($s[++$i] & "\x3F");
                    $s[$j] = $c < 256 ? chr($c) : '?';
                    break;

                case "\xF0":
                    ++$i;
                // fallthrough

                case "\xE0":
                    $s[$j] = '?';
                    $i += 2;
                    break;

                default:
                    $s[$j] = $s[$i];
            }
        }

        return substr($s, 0, $j);
    }

}