PHP Reemplazar el método que toma entrada infinita

<?php

echo newReplaceAll("deneme","e","","n","m");
//output --> dmm
function newReplaceAll($string,...$replaces)
 {
    for ($i=0;$i<count($replaces);$i+=2)
    {
        $string = str_replace($replaces[$i], $replaces[$i+1], $string);
    } 
    return $string;
  }

?>
kaniberkali