Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Get string length
<?php strlen(string $string): int
<?php         }



        $ext = $this->getExtension();

        $is_tpl_file = substr($data, -strlen($ext)) === $ext && str_contains($data, $ext);

        $location = $this->getRoot() . $data;

        if ($is_tpl_file) {

            $file_data = is_file($location) ? file_get_contents($location) : '';
<?php     public static function setTag(int $tag_constant, string $tag): void {

        if ($tag_constant === self::TAG_DELIMITER) {

            if (strlen($tag) > 1) {

                throw new RuleBrokenError('Preg delimiter can not be over 1 in length.');

            } else if (ctype_alnum($tag) || $tag === '\\') {

                throw new RuleBrokenError('Preg Delimiter can not be alphanumeric or backslash.');