Oppure....

$a = 0;
$str = "testo testo testo ". ($a == 4 ? "pippo" : "pasticcio"). "testo testo testo";
print $str;