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. }
  9.  
  10. $n =3;
  11. printPattern($n);
Success #stdin #stdout #stderr 0.03s 26208KB
stdin
3
stdout
**
stderr
PHP Notice:  Undefined variable: n in /home/Uixoo1/prog.php on line 10