[lang-ref] ( replace_all ) ( php )

<?php
public function testReplaceAll(): void
{
	// str_replace($before, $after, $text)
	$text_org = "abc def ghi\nabc def ghi";
	$s_org = 'def';
	$s_new  = '!!DEF!!';

	$text_new = str_replace($s_org, $s_new, $text_org);

	$this->assertSame("abc !!DEF!! ghi\nabc !!DEF!! ghi", $text_new);
}