That's because preg_replace wants those funky Perl-style regular expressions:
$pizza =
array('/piece1/','/piece2/','/piece3/','/piece4/','/piece5/','/piece6/');
You also could do this with ereg_replace, without arrays, and without the funky slashes. Keep in mind that the pipe character means "or" to the regex engine:
<?
$test = 'this is the piece1 of text i am trying to change piece2';
$pizza = "piece1|piece2|piece3|piece4|piece5|piece6";
$test = ereg_replace($pizza,"*****",$test);
echo $test;
?>