[lang-ref] ( replace_with_range ) ( php )
<?php
public function testReplaceWithRange(): void
{
// substr_replace($text, $after, $start, $length)
$text_org = 'abcdefghi';
$text_new = substr_replace($text_org, 'BC', 1, 2);
$this->assertSame('aBCdefghi', $text_new);
}