fork download
  1. <?php
  2.  
  3. // your code goes here
  4. function printPattern($n){
  5. for($i=1; $i<=$n+2; $i++){
  6. echo "*";
  7. }
  8. echo "</br>";
  9. }
  10.  
  11. $n =3;
  12. printPattern($n);
Success #stdin #stdout 0.03s 25300KB
stdin
Standard input is empty
stdout
*****</br>