Supported Versions: PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8
Get part of string
<?php mb_substr(    string $string,    int $start,    ?int $length = null,    ?string $encoding = null): string
<?php     protected function insertLineNumberAtPosition(int $position, string $value)

    {

        $before = mb_substr($value, 0, $position);

        $lineNumber = count(explode("\n", $before));



        return mb_substr($value, 0, $position)."|---LINE:{$lineNumber}---|".mb_substr($value, $position);
<?php         $before = mb_substr($value, 0, $position);

        $lineNumber = count(explode("\n", $before));



        return mb_substr($value, 0, $position)."|---LINE:{$lineNumber}---|".mb_substr($value, $position);

    }



    protected function trimEmptyLines(string $value)