CoreFiles by mySites.guru
ByteLengthTrait.php19 lines, 399 bytes, from Joomla_6.2.1-rc1-Release_Candidate-Full_Package.zip
Raw History Compare with 6.2.0-rc2
md5
71045c245e5bc4fd386404bdd9643653
sha1
14376c53bbde83461b41f9e09c4779088423f28b
sha256
e438af26caec963faa07f3d148a4414f6aeda694b161e2801ef2cf60021d44fc
<?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((string) $string);
    }
}

The same content is in 34 releases, Joomla 6.0.3-rc1 to 6.3.0-alpha1. See them all, or every version of this file.