substr_replace

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Replace text within a portion of a string
<?php substr_replace(    array|string $string,    array|string $replace,    array|int $offset,    array|int|null $length = null): string|array
<?php         $lengthOfTagName = strlen($tagName);

        $positionOfFirstCharacterInTagName = $matches[1][1];



        return substr_replace(

            $html,

            ' '.$attributesFormattedForHtmlElement,

            $positionOfFirstCharacterInTagName + $lengthOfTagName,

            0

        );

    }



    static function stringifyHtmlAttributes($attributes)