fork download
  1. <?php
  2.  
  3. function credit($credit, $percent, $comis){
  4. for($i=0; $depo>0;$i++){
  5. $depo = (($credit*$percent + $comis) - 5000);
  6.  
  7. return $depo;
  8. echo "прошло {$i} месяцев";
  9. if($depo<0);
  10.  
  11. echo "прошло {$i} месяцев";
  12. }
  13. }
  14. credit(40000, 1.04, 5000);
Success #stdin #stdout #stderr 0.04s 25928KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
PHP Notice:  Undefined variable: depo in /home/dIIB5F/prog.php on line 4