๐Ÿš€ Hostinger Optimized
๐Ÿ–ฅ๏ธ Server: LiteSpeed
๐Ÿ’ป System: Linux s20058.bom1.stableserver.net 5.14.0-611.55.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 19 15:19:29 EDT 2026 x86_64
๐Ÿ‘ค User: skhata (1324)
๐Ÿ˜ PHP: 8.4.20
๐Ÿšซ Disabled: โœจ NONE

๐Ÿ’ป Terminal

๐Ÿ“ /home/skhata/chandrasons.com/public
$

๐Ÿ“„ Php85.php

๐Ÿ“ Path: /home/skhata/chandrasons.com/vendor/symfony/polyfill-php85/Php85.php
๐Ÿ“Š Size: 5.35 KB
๐Ÿ”’ Perm: 0644
๐Ÿ“ MIME: text/x-php
<?php

/*
 * This file is part of the Symfony package.
 *
 * (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 Symfony\Polyfill\Php85;

/**
 * @author Pierre Ambroise <pierre27.ambroise@gmail.com>
 * @author Alexander Schranz <alexander@sulu.io>
 *
 * @internal
 */
final class Php85
{
    public static function get_error_handler(): ?callable
    {
        $handler = set_error_handler(null);
        restore_error_handler();

        return $handler;
    }

    public static function get_exception_handler(): ?callable
    {
        $handler = set_exception_handler(null);
        restore_exception_handler();

        return $handler;
    }

    public static function array_first(array $array)
    {
        foreach ($array as $value) {
            return $value;
        }

        return null;
    }

    public static function array_last(array $array)
    {
        return $array ? current(\array_slice($array, -1)) : null;
    }

    private const RTL_SCRIPTS = [
        'Adlm' => true, 'Arab' => true, 'Armi' => true, 'Hebr' => true,
        'Mand' => true, 'Mani' => true, 'Mend' => true, 'Nkoo' => true,
        'Orkh' => true, 'Phnx' => true, 'Rohg' => true, 'Samr' => true,
        'Syrc' => true, 'Thaa' => true, 'Yezi' => true,
    ];

    private const LANG_TO_SCRIPT = [
        'ar' => 'Arab',
        'ckb' => 'Arab',
        'dv' => 'Thaa',
        'fa' => 'Arab',
        'he' => 'Hebr',
        'ku' => 'Arab',
        'nqo' => 'Nkoo',
        'ps' => 'Arab',
        'sd' => 'Arab',
        'ug' => 'Arab',
        'ur' => 'Arab',
        'yi' => 'Hebr',
    ];

    public static function locale_is_right_to_left(string $locale): bool
    {
        if ('' === $locale) {
            return false;
        }

        $parts = preg_split('/[_-]/', $locale);
        $language = strtolower($parts[0]);

        foreach ($parts as $part) {
            if (4 === \strlen($part) && ctype_alpha($part)) {
                return isset(self::RTL_SCRIPTS[ucfirst(strtolower($part))]);
            }
        }

        return isset(self::LANG_TO_SCRIPT[$language]) && isset(self::RTL_SCRIPTS[self::LANG_TO_SCRIPT[$language]]);
    }

    public static function grapheme_levenshtein(string $s1, string $s2, int $insertion_cost = 1, int $replacement_cost = 1, int $deletion_cost = 1)
    {
        if (!preg_match('//u', $s1) || !preg_match('//u', $s2)) {
            return false;
        }

        if (0 > $insertion_cost || 0 > $replacement_cost || 0 > $deletion_cost) {
            throw new \ValueError('grapheme_levenshtein(): Argument #3 ($insertion_cost), #4 ($replacement_cost), and #5 ($deletion_cost) must be greater than or equal to 0');
        }

        $regex = ((float) \PCRE_VERSION < 10 ? (float) \PCRE_VERSION >= 8.32 : (float) \PCRE_VERSION >= 10.39)
            ? '\X'
            : '(?:\r\n|(?:[ -~\x{200C}\x{200D}]|[แ†จ-แ‡น]+|[แ„€-แ…Ÿ]*(?:[๊ฐ€๊ฐœ๊ฐธ๊ฑ”๊ฑฐ๊ฒŒ๊ฒจ๊ณ„๊ณ ๊ณผ๊ด˜๊ดด๊ต๊ตฌ๊ถˆ๊ถค๊ท€๊ทœ๊ทธ๊ธ”๊ธฐ๊นŒ๊นจ๊บ„๊บ ๊บผ๊ป˜๊ปด๊ผ๊ผฌ๊ฝˆ๊ฝค๊พ€๊พœ๊พธ๊ฟ”๊ฟฐ๋€Œ๋€จ๋„๋ ๋ผ๋‚˜๋‚ด๋ƒ๋ƒฌ๋„ˆ๋„ค๋…€๋…œ๋…ธ๋†”๋†ฐ๋‡Œ๋‡จ๋ˆ„๋ˆ ๋ˆผ๋‰˜๋‰ด๋А๋Šฌ๋‹ˆ๋‹ค๋Œ€๋Œœ๋Œธ๋”๋ฐ๋ŽŒ๋Žจ๋„๋ ๋ผ๋˜๋ด๋‘๋‘ฌ๋’ˆ๋’ค๋“€๋“œ๋“ธ๋””๋”ฐ๋•Œ๋•จ๋–„๋– ๋–ผ๋—˜๋—ด๋˜๋˜ฌ๋™ˆ๋™ค๋š€๋šœ๋šธ๋›”๋›ฐ๋œŒ๋œจ๋„๋ ๋ผ๋ž˜๋žด๋Ÿ๋Ÿฌ๋ ˆ๋ ค๋ก€๋กœ๋กธ๋ข”๋ขฐ๋ฃŒ๋ฃจ๋ค„๋ค ๋คผ๋ฅ˜๋ฅด๋ฆ๋ฆฌ๋งˆ๋งค๋จ€๋จœ๋จธ๋ฉ”๋ฉฐ๋ชŒ๋ชจ๋ซ„๋ซ ๋ซผ๋ฌ˜๋ฌด๋ญ๋ญฌ๋ฎˆ๋ฎค๋ฏ€๋ฏœ๋ฏธ๋ฐ”๋ฐฐ๋ฑŒ๋ฑจ๋ฒ„๋ฒ ๋ฒผ๋ณ˜๋ณด๋ด๋ดฌ๋ตˆ๋ตค๋ถ€๋ถœ๋ถธ๋ท”๋ทฐ๋ธŒ๋ธจ๋น„๋น ๋นผ๋บ˜๋บด๋ป๋ปฌ๋ผˆ๋ผค๋ฝ€๋ฝœ๋ฝธ๋พ”๋พฐ๋ฟŒ๋ฟจ์€„์€ ์€ผ์˜์ด์‚์‚ฌ์ƒˆ์ƒค์„€์„œ์„ธ์…”์…ฐ์†Œ์†จ์‡„์‡ ์‡ผ์ˆ˜์ˆด์‰์‰ฌ์Šˆ์Šค์‹€์‹œ์‹ธ์Œ”์Œฐ์Œ์จ์Ž„์Ž ์Žผ์˜์ด์์ฌ์‘ˆ์‘ค์’€์’œ์’ธ์“”์“ฐ์”Œ์”จ์•„์• ์•ผ์–˜์–ด์—์—ฌ์˜ˆ์˜ค์™€์™œ์™ธ์š”์šฐ์›Œ์›จ์œ„์œ ์œผ์˜์ด์ž์žฌ์Ÿˆ์Ÿค์ €์ œ์ ธ์ก”์กฐ์ขŒ์ขจ์ฃ„์ฃ ์ฃผ์ค˜์คด์ฅ์ฅฌ์ฆˆ์ฆค์ง€์งœ์งธ์จ”์จฐ์ฉŒ์ฉจ์ช„์ช ์ชผ์ซ˜์ซด์ฌ์ฌฌ์ญˆ์ญค์ฎ€์ฎœ์ฎธ์ฏ”์ฏฐ์ฐŒ์ฐจ์ฑ„์ฑ ์ฑผ์ฒ˜์ฒด์ณ์ณฌ์ดˆ์ดค์ต€์ตœ์ตธ์ถ”์ถฐ์ทŒ์ทจ์ธ„์ธ ์ธผ์น˜์นด์บ์บฌ์ปˆ์ปค์ผ€์ผœ์ผธ์ฝ”์ฝฐ์พŒ์พจ์ฟ„์ฟ ์ฟผํ€˜ํ€ดํํฌํ‚ˆํ‚คํƒ€ํƒœํƒธํ„”ํ„ฐํ…Œํ…จํ†„ํ† ํ†ผํ‡˜ํ‡ดํˆํˆฌํ‰ˆํ‰คํŠ€ํŠœํŠธํ‹”ํ‹ฐํŒŒํŒจํ„ํ ํผํŽ˜ํŽดํํฌํˆํคํ‘€ํ‘œํ‘ธํ’”ํ’ฐํ“Œํ“จํ”„ํ” ํ”ผํ•˜ํ•ดํ–ํ–ฌํ—ˆํ—คํ˜€ํ˜œํ˜ธํ™”ํ™ฐํšŒํšจํ›„ํ› ํ›ผํœ˜ํœดํํฌํžˆ]?[แ… -แ†ข]+|[๊ฐ€-ํžฃ])[แ†จ-แ‡น]*|[แ„€-แ…Ÿ]+|[^\p{Cc}\p{Cf}\p{Zl}\p{Zp}])[\p{Mn}\p{Me}\x{09BE}\x{09D7}\x{0B3E}\x{0B57}\x{0BBE}\x{0BD7}\x{0CC2}\x{0CD5}\x{0CD6}\x{0D3E}\x{0D57}\x{0DCF}\x{0DDF}\x{200C}\x{200D}\x{1D165}\x{1D16E}-\x{1D172}]*|[\p{Cc}\p{Cf}\p{Zl}\p{Zp}])';

        preg_match_all('/'.$regex.'/u', $s1, $s1);
        preg_match_all('/'.$regex.'/u', $s2, $s2);

        $s1 = $s1[0];
        $s2 = $s2[0];
        $l1 = \count($s1);
        $l2 = \count($s2);

        if (0 === $l1) {
            return $l2 * $insertion_cost;
        }
        if (0 === $l2) {
            return $l1 * $deletion_cost;
        }

        $dp = array_fill(0, $l1 + 1, array_fill(0, $l2 + 1, 0));

        for ($i = 1; $i <= $l1; ++$i) {
            $dp[$i][0] = $dp[$i - 1][0] + $deletion_cost;
        }
        for ($j = 1; $j <= $l2; ++$j) {
            $dp[0][$j] = $dp[0][$j - 1] + $insertion_cost;
        }

        for ($i = 1; $i <= $l1; ++$i) {
            for ($j = 1; $j <= $l2; ++$j) {
                $cost = ($s1[$i - 1] === $s2[$j - 1]) ? 0 : $replacement_cost;
                $dp[$i][$j] = min($dp[$i - 1][$j] + $deletion_cost, $dp[$i][$j - 1] + $insertion_cost, $dp[$i - 1][$j - 1] + $cost);
            }
        }

        return $dp[$l1][$l2];
    }
}
โ† Back๐Ÿ“ฅ Rawโœ๏ธ Edit๐Ÿ”’ Chmod
โœจ File Manager Magic โœจ