<?php
function replaceFool ($text){
	$regExp = '/(д|d) ?(у|y) ?(р|p|r) ?(а|a) ?(к|k)/ui';
	$text = preg_replace($regExp, "хороший человек", $text);
	echo $text."\n!!!!!!\n";
}
$checkText = [
	"Попка - дурак!",
	"Попка - дуRaК",
	"Попка - D у P ak",
	"Попка - д-у-р-а-к"
	];
foreach($checkText as $text){
	echo $text."\n";
	replaceFool($text);
}
// your code goes here