factor - PHP Online

Form of PHP Sandbox

Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php in the places where the PHP script should be executed.



Your result can be seen below.

Result of php executing





Full code of factor.php

  1. <?php
  2.     function rec(&$a,&$b,&$c)
  3.     {
  4.         $a += 1;
  5.         if ($a <= $b)
  6.         {
  7.             $c *= $a;
  8.             return rec($a,$b,$c);
  9.         }
  10.         else
  11.         {
  12.             var_dump($c);
  13.         }
  14.     }
  15. $n = 0;
  16. $l = 3;
  17. $f = 1;
  18. rec($n,$l,$f);
File Description
  • factor
  • PHP Code
  • 13 May-2022
  • 260 Bytes
You can Share it: