CoreFiles by mySites.guru
ByteLengthTrait.php17 lines, 398 bytes, from Joomla_5.3.0-rc1-Release_Candidate-Full_Package.zip
Raw History Compare with 5.2.4-rc1
md5
448b422867bd7b3e214c0b37fda87f5c
sha1
3b629d31eac6be45167726eab7965642533e34bf
sha256
86fa31b0a996c76f6451529a8492f67ae966c3c2844dd837eef2937bb8bb7647
<?php declare(strict_types=1);

namespace Algo26\IdnaConvert\TranscodeUnicode;

trait ByteLengthTrait
{
    protected function getByteLength(string $string): int
    {
        if ((extension_loaded('mbstring')
             && (ini_get('mbstring.func_overload') & 0x02) === 0x02)
        ) {
            return mb_strlen($string, '8bit');
        }

        return strlen((binary) $string);
    }
}

The same content is in 4 releases, Joomla 5.3.0-rc1 to 6.0.0-alpha3. See them all, or every version of this file.