Print 1...100 using php code with the following instructions

There are plenty of sites around that explain why using ($x%3==0)&&($x%5==0) is the wrong way to approach this problem. The simple explanation is that adding a third condition expands the number of tests from three to seven and adding a fourth condition expands it to fifteen - where you only really need as many tests as there are conditions when you write the answer properly.

Here’s an example (untested but should give the general idea of how the code should look) with only one test per condition instead of testing all the combinations of conditions as well.

$h = array_reduce(range(1, 100), function ($h, $n) {
$t='';
if(!($n%3)) $t.='"Mpasho';
if(!($n%5)) $t.='Star';
return $h.(strlen($t)>0?$t:$n).'<br>';
},'');