0

Explain below code

<?php $taran = 0; function num($a) { global $taran; $taran ++; if ($a<1) return; else num($a-1); num($a-3); } num(5); echo ($taran); ?>

20th Feb 2020, 5:16 PM
Asharaf khan
Asharaf khan - avatar
1 Answer
0
the num function is a recursive function witch increments the value of $taran with 1 with every pass and exits when $a<1
20th Feb 2020, 7:00 PM
Gabriel Ilie
Gabriel Ilie - avatar